Ejemplo n.º 1
0
 private IService AddService <T>()
 {
     try
     {
         IServiceBuilder serviceBuilder = new ServiceBuilder();
         container.Add(typeof(T), serviceBuilder.Create <T>());
     }
     catch (Exception e)
     {
         throw e;
     }
     return(container[typeof(T)]);
 }
Ejemplo n.º 2
0
        public void Start()
        {
            var builder = ServiceBuilder.Create();

            builder.WithHostname("localhost")
            .WithParser(new Common.Logic.Parser())
            .WithPort(8080)
            .WithPath("Dsmr/ParserService");

            var service = builder.Build();

            this.m_host = service;
            this.m_host.Open();
            logger.Info("Server started.");
        }