winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

ManifestShadowLocalization.cs (1488B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="ManifestShadowLocalization.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace Microsoft.WinGetUtil.Models.V1
      8 {
      9     using System.Collections.Generic;
     10 
     11     /// <summary>
     12     /// Localization properties for shadow manifest.
     13     /// </summary>
     14     public class ManifestShadowLocalization
     15     {
     16         /// <summary>
     17         /// Gets or sets the locale.
     18         /// </summary>
     19         public string PackageLocale { get; set; }
     20 
     21         /// <summary>
     22         /// Gets or sets the manifest icons information.
     23         /// </summary>
     24         public List<ManifestIcon> Icons { get; set; }
     25 
     26         /// <summary>
     27         /// Returns a List of strings containing the URIs contained within this localization.
     28         /// </summary>
     29         /// <returns>List of strings.</returns>
     30         public List<string> GetURIs()
     31         {
     32             List<string> uris = new List<string>();
     33 
     34             if (this.Icons != null)
     35             {
     36                 foreach (var icon in this.Icons)
     37                 {
     38                     if (!string.IsNullOrEmpty(icon.IconUrl))
     39                     {
     40                         uris.Add(icon.IconUrl);
     41                     }
     42                 }
     43             }
     44 
     45             return uris;
     46         }
     47     }
     48 }