public static int Comparison(ServerModVersion left, ServerModVersion right) { if (left.forkCode != right.forkCode) { return(string.Compare(left.forkCode, right.forkCode)); } return(left <right ? -1 : left> right ? 1 : 0); }
public static bool TryParse(string input, out ServerModVersion version) { try { version = new ServerModVersion(input); return(true); } catch (ServerModParseException) { version = ServerModVersion.Empty; return(false); } }