internal AspNetCoreReleaseComponent(JToken token, ProductRelease release) : base(token, release)
        {
#pragma warning disable CA1825 // Avoid zero-length array allocations, Array.Empty<T> is only supported in netstandard2.1
            AspNetCoreModuleVersions = new ReadOnlyCollection <Version>(token["version-aspnetcoremodule"]?.ToObject <Version[]>(Utils.DefaultSerializer) ?? new Version[] { });
#pragma warning restore CA1825 // Avoid zero-length array allocations
            VisualStudioVersion = (string)token["vs-version"];
        }
 internal SdkReleaseComponent(JToken token, ProductRelease release) : base(token, release)
 {
     CSharpVersion          = (string)token["csharp-version"];
     FSharpVersion          = (string)token["fsharp-version"];
     VisualBasicVersion     = (string)token["vb-version"];
     RuntimeVersion         = token["runtime-version"]?.ToObject <ReleaseVersion>(Utils.DefaultSerializer);
     VisualStudioMacSupport = (string)token["vs-mac-support"];
     VisualStudioMacVersion = (string)token["vs-mac-version"];
     VisualStudioSupport    = (string)token["vs-support"];
     VisualStudioVersion    = (string)token["vs-version"];
 }
Exemplo n.º 3
0
        internal ReleaseComponent(JToken token, ProductRelease release)
        {
            if (token == null)
            {
                throw new ArgumentNullException(nameof(token));
            }

            Version        = token["version"]?.ToObject <ReleaseVersion>(Utils.DefaultSerializer);
            DisplayVersion = token["version-display"]?.ToString();
            JToken             filesToken = token["files"];
            List <ReleaseFile> fileList   = filesToken.IsNullOrEmpty() ? new List <ReleaseFile>() :
                                            JsonConvert.DeserializeObject <List <ReleaseFile> >(filesToken.ToString(), Utils.DefaultSerializerSettings);

            Release = release;

            // Trim out marketing files. Users should never interact with these
            Files = new ReadOnlyCollection <ReleaseFile>(fileList.Where(f => !f.Name.Contains("-gs") || !f.Name.Contains("-nj")).ToList());
        }
Exemplo n.º 4
0
 internal WindowsDesktopReleaseComponent(JToken token, ProductRelease release) : base(token, release)
 {
 }
 internal RuntimeReleaseComponent(JToken token, ProductRelease release) : base(token, release)
 {
 }