Пример #1
0
        public bool Start(HostControl hostControl)
        {
            _usageInspectionRepository = PlumbingFactory.GetContainer().Resolve <UsageInspectionRepository>();
            var abc = _usageInspectionRepository.GetUsageHistory();

            return(true);
        }
Пример #2
0
        static void Main(string[] args)
        {
            PlumbingFactory.Register();
            HostFactory.Run(x =>
            {
                x.UseAutofacContainer(PlumbingFactory.GetContainer());
                x.Service <UsageInspection>();
                x.RunAsLocalSystem();
                x.StartAutomatically();

                //x.SetDescription(Settings.Default.ServiceDescription);
                //x.SetDisplayName(Settings.Default.ServiceDisplayName);
                //x.SetServiceName(Settings.Default.ServiceName);
            });
        }