예제 #1
0
 public virtual void TestStopProxy()
 {
     TestRPC.StoppedProtocol proxy = RPC.GetProxy <TestRPC.StoppedProtocol>(TestRPC.StoppedProtocol
                                                                            .versionID, null, conf);
     TestRPC.StoppedInvocationHandler invocationHandler = (TestRPC.StoppedInvocationHandler
                                                           )Proxy.GetInvocationHandler(proxy);
     Assert.Equal(0, invocationHandler.GetCloseCalled());
     RPC.StopProxy(proxy);
     Assert.Equal(1, invocationHandler.GetCloseCalled());
 }
예제 #2
0
 public virtual void TestWrappedStopProxy()
 {
     TestRPC.StoppedProtocol wrappedProxy = RPC.GetProxy <TestRPC.StoppedProtocol>(TestRPC.StoppedProtocol
                                                                                   .versionID, null, conf);
     TestRPC.StoppedInvocationHandler invocationHandler = (TestRPC.StoppedInvocationHandler
                                                           )Proxy.GetInvocationHandler(wrappedProxy);
     TestRPC.StoppedProtocol proxy = (TestRPC.StoppedProtocol)RetryProxy.Create <TestRPC.StoppedProtocol
                                                                                 >(wrappedProxy, RetryPolicies.RetryForever);
     Assert.Equal(0, invocationHandler.GetCloseCalled());
     RPC.StopProxy(proxy);
     Assert.Equal(1, invocationHandler.GetCloseCalled());
 }