/// <summary> /// Tries to get the message type number for an ETP message. /// </summary> /// <param name="messageBodyType">The message body type to get the protocol for.</param> /// <returns>The message type number on success; -1 otherwise.</returns> public static int TryGetMessageTypeNumber(Type messageBodyType) { int messageType; if (MessageTypeByMessage.TryGetValue(messageBodyType, out messageType)) return messageType; return -1; }
/// <summary> /// Tries to get the message type number for an ETP message. /// </summary> /// <param name="messageBodyType">The message body type to get the protocol for.</param> /// <returns>The message type number on success; -1 otherwise.</returns> public static int TryGetMessageTypeNumber(Type messageBodyType) { int messageType; if (MessageTypeByMessage.TryGetValue(messageBodyType, out messageType)) { return(messageType); } return(-1); }