/** * Private constructor. */ private Info() { Console.Error.WriteLine(APP_MSG); Console.Error.WriteLine(LICENSE_MSG); Console.Error.Flush(); Assembly assembly = Assembly.GetExecutingAssembly(); version = new VersionNumber(assembly.GetName().Version.ToString()); Logger.Info("vlcsharp: {}", version != null ? version.ToString() : "<version not available>"); Logger.Info("runtime: {} {}", assembly.ImageRuntimeVersion, Environment.Is64BitProcess ? "64-bit" : "32-bit"); Logger.Info("os: {} {}", Environment.OSVersion.ToString(), Environment.Is64BitOperatingSystem ? "64-bit" : "32-bit"); }
public int CompareTo(object o) { if (o == null) { return(1); } VersionNumber other = o as VersionNumber; if (other != null) { if (major == other.major) { if (minor == other.minor) { if (revision == other.revision) { return(0); } else { return(revision - other.revision); } } else { return(minor - other.minor); } } else { return(major - other.major); } } else { throw new ArgumentException("Other object is not a VersionNumber"); } }
/** * Test whether or not this version is at least the required version. * * @param required required version * @return <code>true</code> if this version is at least (equal to or * greater than) the required version */ public bool AtLeast(VersionNumber required) { return(CompareTo(required) >= 0); }
/** * Test whether or not this version is at least the required version. * * @param required required version * @return <code>true</code> if this version is at least (equal to or * greater than) the required version */ public bool AtLeast(VersionNumber required) { return CompareTo(required) >= 0; }