private DiscoveredServiceMethod ConvertToProto(IDiscoveredServiceMethod method)
        {
            var proto = DiscoveredServiceMethod.Rent();

            proto.MethodType      = ConvertToProto(method.MethodType);
            proto.InputMessageId  = method.InputMessageId.ConvertToProtoStrict();
            proto.OutputMessageId = method.OutputMessageId.ConvertToProtoStrict();
            proto.MethodId        = method.MethodId.ConvertToProtoStrict();
            proto.MethodTitle     = method.MethodTitle.ConvertToProto();
            return(proto);
        }
Example #2
0
        public IDiscoveredServiceMethod CreateDiscoveredServiceMethod(
            string methodId,
            Maybe <string> methodTitle,
            string inputMessageId,
            string outputMessageId,
            MethodType methodType)
        {
            var obj = DiscoveredServiceMethod.Rent();

            obj.MethodId        = methodId;
            obj.MethodTitle     = methodTitle;
            obj.InputMessageId  = inputMessageId;
            obj.OutputMessageId = outputMessageId;
            obj.MethodType      = methodType;
            return(obj);
        }
        public IDiscoveredServiceMethod CreateDiscoveredServiceMethod(
            string methodId,
            Maybe <string> methodTitle,
            string inputMessageId,
            string outputMessageId,
            MethodType methodType,
            IReadOnlyCollection <IOption> options)
        {
            var obj = DiscoveredServiceMethod.Rent();

            obj.MethodId        = methodId;
            obj.MethodTitle     = methodTitle;
            obj.InputMessageId  = inputMessageId;
            obj.OutputMessageId = outputMessageId;
            obj.MethodType      = methodType;
            obj.Options         = options;
            return(obj);
        }