예제 #1
0
        public virtual DynamicContentItem ToDynamicContentItem(marketingDto.DynamicContentItem contentItemDto)
        {
            var result = ServiceLocator.Current.GetInstance <MarketingFactory>().CreateDynamicContentItem();

            result.InjectFrom <NullableAndEnumValueInjecter>(contentItemDto);

            if (contentItemDto.DynamicProperties != null)
            {
                result.DynamicProperties = contentItemDto.DynamicProperties.Select(ToDynamicProperty).ToList();
            }

            return(result);
        }
        public virtual DynamicContentItem ToDynamicContentItem(marketingDto.DynamicContentItem contentItemDto)
        {
            var result = new DynamicContentItem();

            result.InjectFrom <NullableAndEnumValueInjecter>(contentItemDto);

            if (contentItemDto.DynamicProperties != null)
            {
                result.DynamicProperties = contentItemDto.DynamicProperties.Select(ToDynamicProperty).ToList();
            }

            return(result);
        }
예제 #3
0
        public virtual DynamicContentItem ToDynamicContentItem(marketingDto.DynamicContentItem contentItemDto)
        {
            var result = new DynamicContentItem();

            result.ContentType = contentItemDto.ContentType;
            result.Description = contentItemDto.Description;
            result.FolderId    = contentItemDto.FolderId;
            result.Id          = contentItemDto.Id;
            result.Name        = contentItemDto.Name;
            result.Outline     = contentItemDto.Outline;
            result.Path        = contentItemDto.Path;

            if (contentItemDto.DynamicProperties != null)
            {
                result.DynamicProperties = contentItemDto.DynamicProperties.Select(ToDynamicProperty).ToList();
            }

            return(result);
        }
예제 #4
0
        public static DynamicContentItem ToDynamicContentItem(this marketingDto.DynamicContentItem contentItemDto)
        {
            var result = new DynamicContentItem
            {
                ContentType = contentItemDto.ContentType,
                Description = contentItemDto.Description,
                FolderId    = contentItemDto.FolderId,
                Id          = contentItemDto.Id,
                Name        = contentItemDto.Name,
                Outline     = contentItemDto.Outline,
                Path        = contentItemDto.Path
            };

            if (contentItemDto.DynamicProperties != null)
            {
                result.DynamicProperties = contentItemDto.DynamicProperties.Select(ToDynamicProperty).ToList();
            }

            return(result);
        }
예제 #5
0
 public static DynamicContentItem ToDynamicContentItem(this marketingDto.DynamicContentItem contentItemDto)
 {
     return(MarketingConverterInstance.ToDynamicContentItem(contentItemDto));
 }