public DoSomethingLoggedInRequiredOperation( SomeParameters parameters, IOperationsManager operationsManager, ISomeRequiredService requiredService) : base(parameters, operationsManager, requiredService) { }
private DoSomethingLoggedInRequiredOperation GetOperationDoSomethingLoggedInRequired(SomeParameters parameters) { return new DoSomethingLoggedInRequiredOperation(parameters, _operationsManager, _requiredService); }
private DoSomethingOperation GetOperationDoSomething(SomeParameters parameters) { return new DoSomethingOperation(parameters, _operationsManager, _someRequiredService, _someRequiredService2); }
public OperationStartInformation DoSomethingLoggedInRequiredAsync(SomeParameters parameters) { return DoOperationAsync(GetOperationDoSomethingLoggedInRequired(parameters)); }
public OperationResult<SomeResult> DoSomethingLoggedInRequired(SomeParameters parameters) { return DoOperation(GetOperationDoSomethingLoggedInRequired(parameters)).ToTypedResult<SomeResult>(); }
public OperationStartInformation DoSomethingAsync(SomeParameters parameters) { return DoOperationAsync(GetOperationDoSomething(parameters)); }
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(); }
public SomeResult DoSomethingLoggedInRequired(SomeParameters parameters) { return (SomeResult)DoOperation(GetOperationDoSomethingLoggedInRequired(parameters)).Result; }
public SomeResult DoSomething(SomeParameters parameters) { return (SomeResult)DoOperation(GetOperationDoSomething(parameters)).Result; }