Cartographer.Compiler.ConversionPatternRepository.LeaseConversionPatternFor C# (CSharp) Method

LeaseConversionPatternFor() public method

public LeaseConversionPatternFor ( Type sourceValueType, Type targetValueType ) : object
sourceValueType System.Type
targetValueType System.Type
return object
        public object LeaseConversionPatternFor(Type sourceValueType, Type targetValueType)
        {
            foreach (var patternType in conversionPatterns)
            {
                var type = conversionPatternGenericCloser.Close(patternType, sourceValueType, targetValueType);
                if (type == null)
                {
                    continue;
                }
                return Activator.CreateInstance(type);
            }
            return null;
        }