Пример #1
0
        public PropertyParameterMapperBuilder <TSourceType> Get <TSourceType>()
        {
            PropertyParameterMapperBuilder <TSourceType> propertyParameterMapperBuilder = null;
            var mapForType = typeof(TSourceType);

            if (PropertyParameterMapperBaseTypeCollection.ContainsKey(mapForType))
            {
                propertyParameterMapperBuilder = PropertyParameterMapperBaseTypeCollection[mapForType];
            }

            return(propertyParameterMapperBuilder);
        }
Пример #2
0
        public PropertyParameterMapperBuilder <TSourceType> Add <TSourceType>()
        {
            var propertyParameterMapperBuilder = new PropertyParameterMapperBuilder <TSourceType>();
            var mapForType = typeof(TSourceType);

            if (PropertyParameterMapperBaseTypeCollection.ContainsKey(mapForType))
            {
                propertyParameterMapperBuilder = PropertyParameterMapperBaseTypeCollection[mapForType];
            }
            else
            {
                PropertyParameterMapperBaseTypeCollection.Add(mapForType, propertyParameterMapperBuilder);
            }

            return(propertyParameterMapperBuilder);
        }