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)]); }
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."); }