Esempio n. 1
0
 checkSupportedProtocol(Ice.ProtocolVersion v)
 {
     if (v.Major != protocolMajor || v.Minor > protocolMinor)
     {
         throw new Ice.UnsupportedProtocolException("", v, Ice.Util.CurrentProtocol);
     }
 }
Esempio n. 2
0
 getCompatibleProtocol(Ice.ProtocolVersion v)
 {
     if (v.Major != Ice.Util.CurrentProtocol.Major)
     {
         return(v); // Unsupported protocol, return as is.
     }
     else if (v.Minor < Ice.Util.CurrentProtocol.Minor)
     {
         return(v); // Supported protocol.
     }
     else
     {
         //
         // Unsupported but compatible, use the currently supported
         // protocol, that's the best we can do.
         //
         return(Ice.Util.CurrentProtocol);
     }
 }
Esempio n. 3
0
 isSupported(Ice.ProtocolVersion version, Ice.ProtocolVersion supported) =>
 version.Major == supported.Major && version.Minor <= supported.Minor;
Esempio n. 4
0
 public static void ice_write(OutputStream ostr, ProtocolVersion v)
 {
     v.ice_writeMembers(ostr);
 }
Esempio n. 5
0
 /// <summary>
 /// Converts a protocol version to a string.
 /// </summary>
 /// <param name="v">The protocol version to convert.</param>
 /// <returns>The converted string.</returns>
 public static string ProtocolVersionToString(ProtocolVersion v) => MajorMinorToString(v.Major, v.Minor);