Esempio n. 1
0
 public NetworkVersion(int major, int minor, int patch, int hotfix, NetworkVersionBuild build, int revision, string name, DateTime date)
 {
     this.major    = major;
     this.minor    = minor;
     this.patch    = patch;
     this.hotfix   = hotfix;
     this.build    = build;
     this.revision = revision;
     this.name     = name;
     this.date     = date;
 }
Esempio n. 2
0
        private static string BuildToString(NetworkVersionBuild build)
        {
            switch (build)
            {
            case NetworkVersionBuild.Alpha:
                return("-alpha");

            case NetworkVersionBuild.Beta:
                return("-beta");

            case NetworkVersionBuild.Custom:
                return("-custom");

            default:
                return(null);
            }
        }
Esempio n. 3
0
        public NetworkVersion(string versionString, InputFormat format)
        {
            this = unavailable;

            if (String.IsNullOrEmpty(versionString))
            {
                return;
            }

            var parameters        = ParseVersionString(versionString, format);
            var converedBuildType = ConvertBuildType(parameters.BuildType);

            major    = parameters.Major;
            minor    = parameters.Minor;
            patch    = parameters.Update;
            hotfix   = parameters.Hotfix;
            build    = converedBuildType;
            revision = parameters.BuildNumber;
            name     = parameters.FancyName;
            date     = parameters.Date;
        }