Exemplo n.º 1
0
        private static void Main()
        {
            try
            {
                var agent      = new RollsAgent();
                var controller = new RollsController(agent);

                ServiceRuntime.RegisterServiceAsync("RollsServiceType",
                                                    context => new RollsServiceEndpoint(context, controller)).GetAwaiter().GetResult();

                ServiceEventSource.Current.ServiceTypeRegistered(Process.GetCurrentProcess().Id, typeof(RollsServiceEndpoint).Name);

                Thread.Sleep(Timeout.Infinite);
            }
            catch (Exception e)
            {
                ServiceEventSource.Current.ServiceHostInitializationFailed(e.ToString());
                throw;
            }
        }
Exemplo n.º 2
0
 public void Initialize()
 {
     _sut = new RollsAgent();
 }