Beispiel #1
0
        public virtual Asset ToAsset(catalogDto.Asset assetDto)
        {
            var result = ServiceLocator.Current.GetInstance <CatalogFactory>().CreateAsset();

            result.InjectFrom <NullableAndEnumValueInjecter>(assetDto);
            return(result);
        }
        public virtual Asset ToAsset(catalogDto.Asset assetDto)
        {
            var result = new Asset();

            result.Url      = assetDto.Url.RemoveLeadingUriScheme();
            result.TypeId   = assetDto.TypeId;
            result.Size     = assetDto.Size;
            result.Name     = assetDto.Name;
            result.MimeType = assetDto.MimeType;
            result.Group    = assetDto.Group;
            return(result);
        }
        public virtual Asset ToAsset(catalogDto.Asset assetDto)
        {
            var result = new Asset
            {
                Url      = assetDto.Url.RemoveLeadingUriScheme(),
                TypeId   = assetDto.TypeId,
                Size     = assetDto.Size,
                Name     = assetDto.Name,
                MimeType = assetDto.MimeType,
                Group    = assetDto.Group
            };

            return(result);
        }
        public static Asset ToAsset(this catalogDto.Asset assetDto)
        {
            var result = new Asset
            {
                Url = assetDto.Url.RemoveLeadingUriScheme(),
                TypeId = assetDto.TypeId,
                Size = assetDto.Size,
                Name = assetDto.Name,
                MimeType = assetDto.MimeType,
                Group = assetDto.Group
            };

            return result;
        }
 public static Asset ToAsset(this catalogDto.Asset assetDto)
 {
     return(CatalogConverterInstance.ToAsset(assetDto));
 }