mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-17 17:04:45 +01:00
39 lines
750 B
C#
39 lines
750 B
C#
using System;
|
|
|
|
namespace PigeonCoopToolkit.Generic
|
|
{
|
|
[Serializable]
|
|
public class VersionInformation
|
|
{
|
|
public string Name;
|
|
|
|
public int Major = 1;
|
|
|
|
public int Minor;
|
|
|
|
public int Patch;
|
|
|
|
public VersionInformation(string name, int major, int minor, int patch)
|
|
{
|
|
Name = name;
|
|
Major = major;
|
|
Minor = minor;
|
|
Patch = patch;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return string.Format("{0} {1}.{2}.{3}", Name, Major, Minor, Patch);
|
|
}
|
|
|
|
public bool Match(VersionInformation other, bool looseMatch)
|
|
{
|
|
if (looseMatch)
|
|
{
|
|
return other.Name == Name && other.Major == Major && other.Minor == Minor;
|
|
}
|
|
return other.Name == Name && other.Major == Major && other.Minor == Minor && other.Patch == Patch;
|
|
}
|
|
}
|
|
}
|