diff options
author | David Karlaš <david.karlas@microsoft.com> | 2018-03-20 12:01:10 +0300 |
---|---|---|
committer | David Karlaš <david.karlas@microsoft.com> | 2018-04-11 12:31:38 +0300 |
commit | 7b8d9d9d3f588b123047c92eb2807d75199b90a6 (patch) | |
tree | 42beb83057327d2d26c6d52d3c7a9ed0b9d65677 /Mono.Addins | |
parent | 94bd9eba0eeb2c57f4964dde819c2270ca6d30b1 (diff) |
Add support for more assets like License, Details and Changelog files
Diffstat (limited to 'Mono.Addins')
-rw-r--r-- | Mono.Addins/Mono.Addins.Description/AddinDescription.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Mono.Addins/Mono.Addins.Description/AddinDescription.cs b/Mono.Addins/Mono.Addins.Description/AddinDescription.cs index 4d3bf62..f3220d0 100644 --- a/Mono.Addins/Mono.Addins.Description/AddinDescription.cs +++ b/Mono.Addins/Mono.Addins.Description/AddinDescription.cs @@ -985,6 +985,23 @@ namespace Mono.Addins.Description iconAsset.SetAttribute ("Addressable", "true"); assetsEl.AppendChild (iconAsset); } + + var propertyToAssetTypeMappings = new Dictionary<string, string>{ + {"VisualStudio.License", "Microsoft.VisualStudio.Services.Content.License"}, + {"VisualStudio.Details", "Microsoft.VisualStudio.Services.Content.Details"}, + {"VisualStudio.Changelog", "Microsoft.VisualStudio.Services.Content.Changelog"}, + }; + + foreach (var mapping in propertyToAssetTypeMappings) { + if (!string.IsNullOrEmpty (Properties.GetPropertyValue (mapping.Key))) { + var asset = vsixDoc.CreateElement ("Asset"); + asset.SetAttribute ("Type", mapping.Value); + asset.SetAttribute ("Path", icon); + asset.SetAttribute ("Addressable", "true"); + assetsEl.AppendChild (asset); + } + } + packageManifestEl.AppendChild (assetsEl); return vsixDoc; |