Cartographer.Compiler.ConversionPatternRepository.LeaseConversionPatternFor C# (CSharp) 메소드

LeaseConversionPatternFor() 공개 메소드

public LeaseConversionPatternFor ( Type sourceValueType, Type targetValueType ) : object
sourceValueType System.Type
targetValueType System.Type
리턴 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;
        }