public HttpResponseMessage Put(SomeParameters parameters) { // var job = this.service.DoJobAsync(parameters); var job = this.service.DoJob(parameters); return(Request.CreateResponse(job.Id)); }
public DoSomethingLoggedInRequiredOperation( SomeParameters parameters, IOperationsManager operationsManager, ISomeRequiredService requiredService) : base(parameters, operationsManager, requiredService) { }
public DoSomethingOperation( SomeParameters parameters, IOperationsManager operationsManager, ISomeRequiredService someRequiredService) : base(operationsManager, "Do Something") { _parameters = parameters; _someRequiredService = someRequiredService; }
private static void UseProxyFactory(IProxyFactory <ITrialsService> proxyFactory) { Console.WriteLine("\n\nUsing {0} as IProxyFactory.", proxyFactory.GetType().GetGenericTypeDefinition().Name); Console.Write("Enter a number: "); int parameter; while (!int.TryParse(Console.ReadLine(), out parameter)) { Console.Write("Please enter a valid integer: "); } var proxy = proxyFactory.GetProxy(); var parameters = new SomeParameters() { Parameter = parameter }; var operationStatus = proxy.Execute(ch => ch.DoSomething(parameters)); Console.WriteLine("Proxy operation result: {0}", operationStatus.Result); Console.Write("Press any key to continue..."); Console.ReadKey(); }
private DoSomethingLoggedInRequiredOperation GetOperationDoSomethingLoggedInRequired(SomeParameters parameters) { return(new DoSomethingLoggedInRequiredOperation(parameters, _operationsManager, _requiredService)); }
public SomeResult DoSomethingLoggedInRequired(SomeParameters parameters) { return((SomeResult)DoOperation(GetOperationDoSomethingLoggedInRequired(parameters)).Result); }
private DoSomethingOperation GetOperationDoSomething(SomeParameters parameters) { return(new DoSomethingOperation(parameters, _operationsManager, _someRequiredService)); }
public SomeResult DoSomething(SomeParameters parameters) { return((SomeResult)DoOperation(GetOperationDoSomething(parameters)).Result); }