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); }
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))); }
YamlObject FromEmbeddedImageAsset(EmbeddedImageAsset asset) { return(new YamlMap { { "Id", asset.Id }, { "Width", asset.Width }, { "Height", asset.Height }, { "Format", asset.Format }, { "SizeInBytes", asset.Bytes.Length }, }); }