Пример #1
0
        YamlObject FromEmbeddedImageAsset(EmbeddedImageAsset asset, YamlMap superclassContent)
        {
            var result = superclassContent;

            result.Add(nameof(asset.Format), asset.Format);
            result.Add(nameof(asset.Bytes.Length), asset.Bytes.Length);
            return(result);
        }
Пример #2
0
 XElement FromEmbeddedImageAsset(EmbeddedImageAsset imageAsset)
 {
     return(new XElement(
                nameof(ImageAsset),
                new XAttribute(nameof(imageAsset.Id), imageAsset.Id),
                new XAttribute(nameof(imageAsset.Width), imageAsset.Width),
                new XAttribute(nameof(imageAsset.Height), imageAsset.Height),
                new XAttribute(nameof(imageAsset.Format), imageAsset.Format),
                new XAttribute("SizeInBytes", imageAsset.Bytes.Length)));
 }
Пример #3
0
 YamlObject FromEmbeddedImageAsset(EmbeddedImageAsset asset)
 {
     return(new YamlMap
     {
         { "Id", asset.Id },
         { "Width", asset.Width },
         { "Height", asset.Height },
         { "Format", asset.Format },
         { "SizeInBytes", asset.Bytes.Length },
     });
 }