repo creation with initial code after cloning public repo
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MediaBrowser.Model.Updates
|
||||
{
|
||||
/// <summary>
|
||||
/// Class InstallationInfo.
|
||||
/// </summary>
|
||||
public class InstallationInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Id.
|
||||
/// </summary>
|
||||
/// <value>The Id.</value>
|
||||
[JsonPropertyName("Guid")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public Version Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the changelog for this version.
|
||||
/// </summary>
|
||||
/// <value>The changelog.</value>
|
||||
public string Changelog { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the source URL.
|
||||
/// </summary>
|
||||
/// <value>The source URL.</value>
|
||||
public string SourceUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a checksum for the binary.
|
||||
/// </summary>
|
||||
/// <value>The checksum.</value>
|
||||
public string Checksum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets package information for the installation.
|
||||
/// </summary>
|
||||
/// <value>The package information.</value>
|
||||
public PackageInfo PackageInfo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MediaBrowser.Model.Updates
|
||||
{
|
||||
/// <summary>
|
||||
/// Class PackageInfo.
|
||||
/// </summary>
|
||||
public class PackageInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PackageInfo"/> class.
|
||||
/// </summary>
|
||||
public PackageInfo()
|
||||
{
|
||||
Versions = Array.Empty<VersionInfo>();
|
||||
Category = string.Empty;
|
||||
Name = string.Empty;
|
||||
Overview = string.Empty;
|
||||
Owner = string.Empty;
|
||||
Description = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a long description of the plugin containing features or helpful explanations.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a short overview of what the plugin does.
|
||||
/// </summary>
|
||||
/// <value>The overview.</value>
|
||||
[JsonPropertyName("overview")]
|
||||
public string Overview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the owner.
|
||||
/// </summary>
|
||||
/// <value>The owner.</value>
|
||||
[JsonPropertyName("owner")]
|
||||
public string Owner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the category.
|
||||
/// </summary>
|
||||
/// <value>The category.</value>
|
||||
[JsonPropertyName("category")]
|
||||
public string Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the guid of the assembly associated with this plugin.
|
||||
/// This is used to identify the proper item for automatic updates.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
[JsonPropertyName("guid")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the versions.
|
||||
/// </summary>
|
||||
/// <value>The versions.</value>
|
||||
[JsonPropertyName("versions")]
|
||||
#pragma warning disable CA2227 // Collection properties should be read only
|
||||
public IList<VersionInfo> Versions { get; set; }
|
||||
#pragma warning restore CA2227 // Collection properties should be read only
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the image url for the package.
|
||||
/// </summary>
|
||||
[JsonPropertyName("imageUrl")]
|
||||
public string? ImageUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace MediaBrowser.Model.Updates
|
||||
{
|
||||
/// <summary>
|
||||
/// Class RepositoryInfo.
|
||||
/// </summary>
|
||||
public class RepositoryInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the URL.
|
||||
/// </summary>
|
||||
/// <value>The URL.</value>
|
||||
public string? Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the repository is enabled.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if enabled.</value>
|
||||
public bool Enabled { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using SysVersion = System.Version;
|
||||
|
||||
namespace MediaBrowser.Model.Updates
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the <see cref="VersionInfo"/> class.
|
||||
/// </summary>
|
||||
public class VersionInfo
|
||||
{
|
||||
private SysVersion? _version;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
[JsonPropertyName("version")]
|
||||
public string Version
|
||||
{
|
||||
get => _version is null ? string.Empty : _version.ToString();
|
||||
|
||||
set => _version = SysVersion.Parse(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version as a <see cref="SysVersion"/>.
|
||||
/// </summary>
|
||||
public SysVersion VersionNumber => _version ?? new SysVersion(0, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the changelog for this version.
|
||||
/// </summary>
|
||||
/// <value>The changelog.</value>
|
||||
[JsonPropertyName("changelog")]
|
||||
public string? Changelog { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ABI that this version was built against.
|
||||
/// </summary>
|
||||
/// <value>The target ABI version.</value>
|
||||
[JsonPropertyName("targetAbi")]
|
||||
public string? TargetAbi { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the source URL.
|
||||
/// </summary>
|
||||
/// <value>The source URL.</value>
|
||||
[JsonPropertyName("sourceUrl")]
|
||||
public string? SourceUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a checksum for the binary.
|
||||
/// </summary>
|
||||
/// <value>The checksum.</value>
|
||||
[JsonPropertyName("checksum")]
|
||||
public string? Checksum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a timestamp of when the binary was built.
|
||||
/// </summary>
|
||||
/// <value>The timestamp.</value>
|
||||
[JsonPropertyName("timestamp")]
|
||||
public string? Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the repository name.
|
||||
/// </summary>
|
||||
[JsonPropertyName("repositoryName")]
|
||||
public string RepositoryName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the repository url.
|
||||
/// </summary>
|
||||
[JsonPropertyName("repositoryUrl")]
|
||||
public string RepositoryUrl { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user