public static BaseMasterMessage ReadMessage(IncomingMessage inMessage)
 {
     BaseMasterMessage rv;
     MasterMessageType messageType = inMessage.ReadMasterMessageType();
     switch (messageType) {
         case MasterMessageType.ResolveResponse:
             rv = new ResolveResponseMessage();
             break;
         default:
             log.ErrorFormat("Unhandled master message type: {0}", messageType);
             return null;
     }
     rv.ParseMasterMessage(inMessage);
     return rv;
 }