Esempio n. 1
0
        protected static RegisterServermoduleMethod DecodeServerMethodRegisterDatabaseServermodule(NetMQMessage message)
        {
            var result = new RegisterServermoduleMethod();

            //result.MethodId = methodId;

            if (1 != message.FrameCount)
            {
                throw new MethodFailedException("Not the right amount of frames");
            }

            var str = message.Pop().ConvertToString();

            result.ConnectionInfo = ConvertToObjectFromJsonString <ConnectionInfo>(str);

            return(result);
        }
        protected static NetMQMessage GenerateRegisterServermoduleMessage(NetMQMessage message, RegisterServermoduleMethod method)
        {
            message.Append(GetFrame(RegisterServermoduleMethod.METHOD_NAME));
            message.Append(ConvertToJson(method.TargetType));
            message.Append(ConvertToJson(method.ConnectionInfo));

            return(message);
        }