Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

587 B
Raw Blame
namespace Kavita.Common.EnvironmentInfo;

public class OsVersionModel
{
    public OsVersionModel(string name, string version, string fullName = null)
    {
        Name = Trim(name);
        Version = Trim(version);

        if (string.IsNullOrWhiteSpace(fullName))
        {
            fullName = $"{Name} {Version}";
        }

        FullName = Trim(fullName);
    }

    private static string Trim(string source)
    {
        return source.Trim().Trim('"', '\'');
    }

    public string Name { get; }
    public string FullName { get; }
    public string Version { get; }
}