dotnet / dotnet/deployment-tools
Productize DOM APIs for release.json
- Dominant language
- C#
- Stars
- 213
- Forks
- 73
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
@joeloff is working on this. The APIs can be reviewed [here](https://apiview.dev/Assemblies/Review/e38c9c587fdb4d05936b952d743b48bd) (internal only link, sorry). The APIs are here:
### API Propsal
```C#
namespace Microsoft.Deployment.DotNet.Releases {
public class AspNetCoreReleaseComponent : ReleaseComponent {
public IReadOnlyCollection AspNetCoreModuleVersions { get; }
public string VisualStudioVersion { get; }
}
public class Cve {
public Cve();
public string Id { get; }
public Uri Url { get; }
public override bool Equals(object obj);
public override int GetHashCode();
}
public class Product {
public Product();
public DateTime? EndOfLifeDate { get; }
public bool IsSecurityUpdate { get; }
public DateTime? LatestReleaseDate { get; }
public ReleaseVersion LatestReleaseVersion { get; }
public ReleaseVersion LatestRuntimeVersion { get; }
public ReleaseVersion LatestSdkVersion { get; }
public string ProductName { get; }
public string ProductVersion { get; }
public Uri ReleasesJson { get; }
public SupportPhase SupportPhase { get; }
public static Task> GetReleasesAsync(Uri releasesJsonUrl);
public Task> GetReleasesAsync();
public Task> GetReleasesAsync(string releasesIndexJsonPath, bool downloadLatest);
public bool IsOutOfSupport();
}
public sealed class ProductCollection : ReadOnlyCollection {
public static readonly Uri ReleaseIndexDefaultUrl;
public static Task CreateAsync();
public static Task CreateAsync(string releasesIndexJsonPath, bool downloadLatest);
public static Task CreateAsync(Uri releasesIndexUrl);
public IEnumerable GetSupportPhases();
}
public class ProductRelease {
public AspNetCoreReleaseComponent AspNetCoreRuntime { get; }
public IReadOnlyCollection Components { get; }
public IReadOnlyCollection Cves { get; }
public IReadOnlyCollection Files { get; }
public bool IsPreview { get; }
public bool IsSecurityUpdate { get; }
public DateTime ReleaseDate { get; }
public Uri ReleaseNotes { get; }
public RuntimeReleaseComponent Runtime { get; }
public IEnumerable Runtimes { get; }
public IReadOnlyCollection Sdks { get; }
public ReleaseVersion Version { get; }
public WindowsDesktopReleaseComponent WindowsDesktopRuntime { get; }
}
public abstract class ReleaseComponent {
public ReleaseVersion DisplayVersion { get; }
public IReadOnlyCollection Files { get; }
public string Name { get; protected set; }
public ProductRelease Release { get; }
public ReleaseVersion Version { get; }
}
public class ReleaseFile {
public ReleaseFile();
public string FileName { get; }
public string Hash { get; }
public string Name { get; }
public string Rid { get; }
public Uri Url { get; }
public Task DownloadAsync(string fileName);
public Task DownloadAsync(string fileName, bool verifyHash);
public override bool Equals(object obj);
public override int GetHashCode();
}
public class ReleaseVersion : IComparable, IComparable, IEquatable, ICloneable {
public ReleaseVersion(string version);
public ReleaseVersion();
public static readonly string Version2Pattern;
public string BuildMetadata { get; set; }
public int Major { get; set; }
public int Minor { get; set; }
public int Patch { get; set; }
public string Prerelease { get; set; }
public int SdkFeatureBand { get; }
public int SdkPatchLevel { get; }
public static int Compare(ReleaseVersion a, ReleaseVersion b);
public static bool Equals(ReleaseVersion a, ReleaseVersion b);
public static bool operator ==(ReleaseVersion a, ReleaseVersion b);
public static bool operator >(ReleaseVersion a, ReleaseVersion b);
public static bool operator >=(ReleaseVersion a, ReleaseVersion b);
public static bool operator !=(ReleaseVersion a, ReleaseVersion b);
public static bool operator <(ReleaseVersion a, ReleaseVersion b);
public static bool operator <=(ReleaseVersion a, ReleaseVersion b);
public object Clone();
public int ComparePrecedence(ReleaseVersion value);
public int CompareTo(object value);
public int CompareTo(ReleaseVersion value);
public bool Equals(ReleaseVersion obj);
public bool PrecedenceEquals(ReleaseVersion value);
public string ToString(int fieldCount);
public override bool Equals(object obj);
public override int GetHashCode();
public override string ToString();
}
public class ReleaseVersionConverter : JsonConverter {
public ReleaseVersionConverter();
public override ReleaseVersion ReadJson(JsonReader reader, Type objectType, ReleaseVersion existingValue, bool hasExistingValue, JsonSerializer serializer);
public override void WriteJson(JsonWriter writer, ReleaseVersion value, JsonSerializer serializer);
}
public class RuntimeReleaseComponent : ReleaseComponent {
public string VisualStudioMacVersion { get; }
public string VisualStudioVersion { get; }
}
public class SdkReleaseComponent : ReleaseComponent {
public string CSharpVersion { get; }
public string FSharpVersion { get; }
public ReleaseVersion RuntimeVersion { get; }
public string VisualBasicVersion { get; }
public string VisualStudioMacSupport { get; }
public string VisualStudioMacVersion { get; }
public string VisualStudioSupport { get; }
public string VisualStudioVersion { get; }
}
public class SupportPhaseConverter : StringEnumConverter {
public SupportPhaseConverter();
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer);
}
public class WindowsDesktopReleaseComponent : ReleaseComponent {
}
public enum SupportPhase {
Unknown = 0,
[EnumMember]
EndOfLife = 1,
Maintenance = 2,
[EnumMember]
LongTermSupport = 3,
Preview = 4,
RC = 5,
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.