Exemple #1
0
 checkSupportedProtocol(Ice.ProtocolVersion v)
 {
     if (v.Major != protocolMajor || v.Minor > protocolMinor)
     {
         throw new Ice.UnsupportedProtocolException("", v, Ice.Util.CurrentProtocol);
     }
 }
Exemple #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);
     }
 }
Exemple #3
0
 isSupported(Ice.ProtocolVersion version, Ice.ProtocolVersion supported) =>
 version.Major == supported.Major && version.Minor <= supported.Minor;
Exemple #4
0
 public static void ice_write(OutputStream ostr, ProtocolVersion v)
 {
     v.ice_writeMembers(ostr);
 }
Exemple #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);