Пример #1
0
        public PingStruct Ping2_2(PingStruct arg1)
        {
            var result = new PingStruct();

            Call(TestServiceConstants.Ping2_2, TestServiceConstants.TestServiceVersion2, arg1, result);
            return(result);
        }
Пример #2
0
 public abstract PingStruct Ping2_2(Caller caller, PingStruct arg1);
Пример #3
0
        protected override void DispatchReceivedCall(ReceivedRpcCall call)
        {
            if (call.Version == TestServiceConstants.TestServiceVersion)
            {
                switch (call.Procedure)
                {
                case TestServiceConstants.Ping_1:
                {
                    var args = new PingStruct();
                    call.RetrieveCall(args);
                    var result = Ping_1(call.Caller, args);
                    call.Reply(result);
                    break;
                }

                case TestServiceConstants.TestMyStruct_1:
                {
                    var args = new MyStruct();
                    call.RetrieveCall(args);
                    var result = TestMyStruct_1(call.Caller, args);
                    call.Reply(result);
                    break;
                }

                default:
                    call.ProcedureUnavailable();
                    break;
                }
            }
            else if (call.Version == TestServiceConstants.TestServiceVersion2)
            {
                switch (call.Procedure)
                {
                case TestServiceConstants.Ping2_2:
                {
                    var args = new PingStruct();
                    call.RetrieveCall(args);
                    var result = Ping2_2(call.Caller, args);
                    call.Reply(result);
                    break;
                }

                case TestServiceConstants.TestMyStruct2_2:
                {
                    var args = new MyStruct();
                    call.RetrieveCall(args);
                    var result = TestMyStruct2_2(call.Caller, args);
                    call.Reply(result);
                    break;
                }

                default:
                    call.ProcedureUnavailable();
                    break;
                }
            }
            else
            {
                call.ProgramMismatch();
            }
        }