public void Start() { try { string[] args = Environment.GetCommandLineArgs(); this.host = WisejHost.Create(); this.host.Shutdown += Host_Shutdown; this.host.Start(GetDomainName(args), GetPortNumber(args)); } catch (Exception ex) { if (ex.InnerException != null) { ex = ex.InnerException; } if (Environment.UserInteractive) { WinForms.MessageBox.Show(ex.Message, ex.GetType().Name, WinForms.MessageBoxButtons.OK, WinForms.MessageBoxIcon.Error); } throw; } }
public void StartServer() { string[] args = Environment.GetCommandLineArgs(); this.host = WisejHost.Create(); this.host.Start(GetDomainName(args), GetPortNumber(args)); }
public Task <string> OpenAsync(CancellationToken cancellationToken) { var endpoint = this.context.CodePackageActivationContext.GetEndpoint("ServiceEndpoint"); this.wisejHost = WisejHost.Create(); this.wisejHost.Start(this.context.NodeContext.IPAddressOrFQDN, endpoint.Port); return(Task.FromResult(this.wisejHost.Url)); }
protected override void OnStop() { this.host = null; }