Beispiel #1
0
        public override void OnStop()
        {
            Trace.TraceInformation("SalesOrder.Cloud.Server.Api is stopping...");

            stop.Set();
            // stopped.WaitOne();

            disposable?.Dispose();

            SalesOrderActorSystem.Stop();

            base.OnStop();
        }
Beispiel #2
0
        public override bool OnStart()
        {
            Trace.TraceInformation("SalesOrder.Cloud.Server.Api is starting...");

            SalesOrderActorSystem.Start();

            ServicePointManager.DefaultConnectionLimit = 12;

            RoleInstanceEndpoint roleInstanceEndpoint = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Api"];

            disposable = WebApp.Start <Startup>($"{ roleInstanceEndpoint.Protocol }://{ roleInstanceEndpoint.IPEndpoint }");

            return(base.OnStart());
        }