Esempio n. 1
0
 public static bool RegistProtocol(Protocol protocol)
 {
     if (null == protocol)
     {
         return(false);
     }
     if (_registProtocolFactory.ContainsKey(protocol.GetMessageID()))
     {
         return(false);
     }
     _registProtocolFactory.Add(protocol.GetMessageID(), new ProtocolFactry(protocol.GetType()));
     return(true);
 }