Example #1
0
 private static void UseInProcessProxy()
 {
     var requiredService = new SomeRequiredService();
     var trialsServiceImpl = new TrialsService(
             new SingleProcessDeploymentOperationsManager(),
             requiredService,
             requiredService); 
     IProxyFactory<ITrialsService> proxyFactory = new InProcessProxyFactory<ITrialsService>(trialsServiceImpl);
     UseProxyFactory(proxyFactory);
 }
        private static void DoSomething(ITrialsService TrialsService)
        {
            int parameter = 73;

            var svc = new TrialsService((new SingleProcessDeploymentOperationsManager()), new SomeRequiredService(), new SomeRequiredService(), new SomeRequiredService());
            var r = svc.DoSomething(new SomeParameters { Parameter = 23 });

            var someResult = TrialsService.DoSomething(new SomeParameters() { Parameter = parameter });
            Assert.AreEqual(
                string.Format(DoSomethingOperation.DO_SOMETHING_RESULT_TEMPLATE, parameter),
                someResult.Result.Result);
        }