예제 #1
0
        private void TryRegisterTargetDto(Type targetDtoType)
        {
            if (_targetDtoPropertyCollection.ContainsKey(targetDtoType))
            {
                return;
            }

            var props = new RelatedDtoPropertyCollection(targetDtoType);

            if (props.Any())
            {
                _targetDtoPropertyCollection.TryAdd(targetDtoType, props);
            }
        }
        protected RelatedDtoPropertyCollection CacheTargetDtoType(Type targetDtoType)
        {
            var props = new RelatedDtoPropertyCollection(targetDtoType);

            if (props.Any())
            {
                _targetDtoPropertyCollection.TryAdd(targetDtoType, props);
            }
            else
            {
                CacheInvalidTargetDtoType(targetDtoType);
                props = null;
            }

            return(props);
        }