示例#1
0
        public ExtensionSimplified GetExtensionByIdSimplified(string id)
        {
            ExtensionSimplified ext;

            try
            {
                var vss = ParseMktpExt(id);

                var toSimplify = ExtensionRaw.FromJson(vss);

                ext = new ExtensionSimplified
                {
                    ExtensionId      = toSimplify.ExtensionId,
                    DisplayName      = toSimplify.DisplayName,
                    Publisher        = toSimplify.Publisher.DisplayName,
                    ShortDescription = toSimplify.ShortDescription,
                    ExtensionName    = toSimplify.ExtensionName,
                    PublisherName    = toSimplify.Publisher.PublisherName
                };
                return(ext);
            }
            catch (Exception e)
            {
                Debug.WriteLine($"Err For id {id}:{e.ToString()}");
                return(null);
            }
        }
示例#2
0
 public ExtensionRaw GetExtensionByIdRaw(string id)
 {
     try
     {
         string vss = ParseMktpExt(id);
         return(ExtensionRaw.FromJson(vss));
     }
     catch (Exception e)
     {
         Debug.WriteLine($"Err For id {id}:{e.ToString()}");
         return(null);
     }
 }