private static void RefreshCategories() { using (var db = new CommenceDatabase()) { categoryNames = db.GetCategoryNames(); } }
protected override void BeginProcessing() { base.BeginProcessing(); using (var db = new CommenceDatabase()) { categoryNames = db.GetCategoryNames(); } logFile = GetLogPath(); changeLog = new ChangeLog() { Date = DateTime.Now }; }
private IEnumerable <object> GetCategories() { using (ICommenceDatabase db = new CommenceDatabase()) { var categories = db.GetCategoryNames(); foreach (string c in categories) { ICategoryDef def = db.GetCategoryDefinition(c); yield return(new { CategoryName = c, Id = def.CategoryID, Clarified = def.Clarified, ClarifyField = def.ClarifyField, ClarifySeparator = def.ClarifySeparator, Duplicates = def.Duplicates, MaxItems = def.MaxItems, Shared = def.Shared }); } } }