protected override void OnStart(string[] args) { using (var writer = new StreamWriter(@"C:\Users\Александр\source\repos\Service\Service\bin\Debug\ServiceWork.txt", true, Encoding.UTF8)) { writer.WriteLine(DateTime.Now + " служба " + this.ServiceName + " запущена"); } Logger.Log.Info(" служба " + this.ServiceName + " запускается"); var folder = ConfigurationManager.AppSettings["Folder"]; string timer = ConfigurationManager.AppSettings["timer"]; var sortFiles = new SortByExtension(folder, int.Parse(timer)); sortFiles.Start(); Logger.Log.Info(" служба " + this.ServiceName + " запусщена"); }
/// <summary> /// Главная точка входа для приложения. /// </summary> private static void Main() { Logger.InitLogger(); if (Environment.UserInteractive) { var sortByExtension = new SortByExtension(@"C:\Users\Александр\Documents\Стажировка Navicon\Exercise4", 10000); sortByExtension.Start(); Logger.Log.Info(" служба " + " запусщена"); } else { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service1() }; ServiceBase.Run(ServicesToRun); } while (true) { ; } }
public override IHtmlString RenderHeader(ViewContext viewContext) { return(SortByExtension.RenderGridHeader(viewContext.RequestContext, base.RenderHeader(viewContext).ToString(), this.PropertyName, this.Order)); }
public override IHtmlString RenderHeaderContainerAtts(ViewContext viewContext) { return(new HtmlString("class='" + SortByExtension.RenderSortHeaderClass(viewContext.RequestContext, this.PropertyName, this.Order).ToString() + "'")); }
public override IHtmlString RenderHeader(ViewContext viewContext) { return(SortByExtension.RenderGridHeader(viewContext.RequestContext, base.RenderHeader(viewContext).ToString(), "Navigation.Show", this.Order)); }