Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        public void StartServer()
        {
            string[] args = Environment.GetCommandLineArgs();

            this.host = WisejHost.Create();
            this.host.Start(GetDomainName(args), GetPortNumber(args));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
 protected override void OnStop()
 {
     this.host = null;
 }