static void Main(string[] args)
 {
     _endpoint = new SendAndProcessEndpoint <BaseEndpointConfig>(new ServerConfig());
     AsyncMain().GetAwaiter().GetResult();
     //AsyncMain1().GetAwaiter().GetResult();
     AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit);
 }
Ejemplo n.º 2
0
        protected async Task OnStartAsync()
        {
            try
            {
                var builder = EndpointConfig.GetContainerBuilder();
                _endpoint = new SendAndProcessEndpoint <BaseEndpointConfig>(EndpointConfig);
                var container = await _endpoint.Create(builder).ConfigureAwait(false);

                await _endpoint.StartEndpoint().ConfigureAwait(false);

                //starts wcf host
                _serviceHostsActivator            = container.Resolve <ServiceHostsActivator>();
                _serviceStartAndShutDownActivator = container.Resolve <StartupAndShutdownActivator>();

                await PerformStartupOperations().ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                //TODO: Log Exception
                Environment.FailFast("Failed to start " + _endpointName + " Endpoint." + ex.GetBaseException() + ex);
            }
        }
Ejemplo n.º 3
0
 static void Main()
 {
     _endpoint = new SendAndProcessEndpoint <BaseEndpointConfig>(new Subscriber1Config());
     AsyncMain().GetAwaiter().GetResult();
     AppDomain.CurrentDomain.ProcessExit += OnProcessExit;
 }
Ejemplo n.º 4
0
 static void Main(string[] args)
 {
     _endpoint = new SendAndProcessEndpoint <BaseEndpointConfig>(new ClientConfig());
     AsyncMain().GetAwaiter().GetResult();
 }