public HorizontalShellViewModel(PipeWrapper pipe, PipeShellWrapper pipeShell) { Pipe = pipe; PipeShell = pipeShell; }
public ExclusiveShellViewModel(PipeWrapper pipe, PipeShellWrapper pipeShell) { Pipe = pipe; PipeShell = pipeShell; }
public EconomUmbrellaViewModel(PipeWrapper pipe, PipeUmbrellaWrapper pipeUmbrella) { Pipe = pipe; PipeUmbrella = pipeUmbrella; }
public VerticalShellViewModel(PipeWrapper pipe, PipeShellWrapper pipeShell) { Pipe = pipe; PipeShell = pipeShell; }
private void InitializePipe(Pipe pipe) { Pipe = new PipeWrapper(pipe); }
public static int Run(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AdHocHost.Log("Starting"); AdHocHost.ParseArguments(args); AdHocHost.Log("Querying activation context"); try { FabricRuntime.GetActivationContext(); AdHocHost.isActivationContextAvailable = true; AdHocHost.Log("ActivationContext get success"); } catch (InvalidOperationException) { AdHocHost.Log("ActivationContext get failed. InvalidOp"); } FabricRuntime runtime = null; Action exitedHandler = () => { AdHocHost.Log("Fabric Exited"); AdHocHost.hasFabricDied = true; // try creating the fabric runtime on a background thread // this should not av if (AdHocHost.recreateRuntimeOnCrash) { Task.Factory.StartNew(() => { while (true) { try { AdHocHost.Log("Creating again"); runtime = FabricRuntime.Create(); AdHocHost.Log("Recreated"); break; } catch (AccessViolationException) { AdHocHost.Log("AV"); throw; } catch (Exception ex) { AdHocHost.Log("Error {0} when re-creating", ex); } } }); } }; AdHocHost.Log("Creating FabricRuntime"); var runtimeTask = FabricRuntime.CreateAsync(exitedHandler, TimeSpan.FromSeconds(5), CancellationToken.None); runtimeTask.Wait(); runtime = runtimeTask.Result; AdHocHost.Log("Registering factories"); foreach (var item in AdHocHost.serviceTypes) { AdHocHost.Log("Registering: {0}", item.Name); var factory = new MyServiceFactory { ServiceImplementationType = item }; Task registerTask = null; if (factory.IsStateful) { registerTask = runtime.RegisterStatefulServiceFactoryAsync(item.Name, factory, TimeSpan.FromSeconds(5), CancellationToken.None); } else { registerTask = runtime.RegisterStatelessServiceFactoryAsync(item.Name, factory, TimeSpan.FromSeconds(5), CancellationToken.None); } registerTask.Wait(); } AdHocHost.Log("Connecting to pipe"); var pipeWrapper = new PipeWrapper(AdHocHost.pipeServerAddress); AdHocHost.Log("Waiting for quit..."); shouldQuitNowEvent.WaitOne(); return(0); }
public PremiumUmbrellaViewModel(PipeWrapper pipe, PipeUmbrellaWrapper pipeUmbrella) { Pipe = pipe; PipeUmbrella = pipeUmbrella; }
public StandartUmbrellaViewModel(PipeWrapper pipe, PipeUmbrellaWrapper pipeUmbrella) { Pipe = pipe; PipeUmbrella = pipeUmbrella; }