Пример #1
0
        public void Delete(string id)
        {
            string dirPath = env.ContentRootPath;

            dirPath = Path.Combine(dirPath, "cronItems", "v1");
            var writ = new Writables(dirPath);

            writ.DeleteFile(id);
        }
Пример #2
0
        public void Delete(string id, [FromServices] IHostingEnvironment hosting)
        {
            string dir = Path.Combine(hosting.ContentRootPath, "definitionHttpEndpoints");

            if (id != null)
            {
                new Writables(dir).DeleteFile(id);
            }
            else
            {
                var w     = new Writables(dir);
                var files = this.Get(hosting);
                files.ToList().ForEach(it => w.DeleteFile(id));
            }
            Program.Shutdown();
        }