public void Load(ScrumrContext context, IEnumerable <TIdentifiable> items) { foreach (var item in items) { item.Context = context; Items.Add(item.ID, item); } }
public DatabaseContainer(ScrumrContext context) { Meta = context.Meta; Projects = new List <Project>(context.Projects); Features = new List <Feature>(context.Features); Sprints = new List <Sprint>(context.Sprints); Tickets = new List <Ticket>(context.Tickets); }
public static async Task <ScrumrContext> LoadContext(string filename, int expectedSchemaVersion) { if (!File.Exists(filename)) { throw new FileNotFoundException(String.Format("Cannot find database '{0}'", filename)); } var isSchemaValid = CheckSchema(filename); return(await ScrumrContext.Load(filename, expectedSchemaVersion)); }
public static async Task <ScrumrContext> Load(string filename, int expectedSchemaVersion) { var instance = new ScrumrContext(); instance.DatabaseFile = new FileInfo(filename); instance.ExpectedSchemaVersion = expectedSchemaVersion; await instance.LoadDatabaseAsync(); return(instance); }
public static async Task <ScrumrContext> CreateBlank(string filename, int schemaVersion) { var instance = new ScrumrContext(); instance.DatabaseFile = new FileInfo(filename); instance.ExpectedSchemaVersion = schemaVersion; await instance.SaveChangesAsync(); return(instance); }
public static async Task CreateNew(string filename, int schemaVersion, bool initialise = true) { var context = await ScrumrContext.CreateBlank(filename, schemaVersion); if (initialise) { context.Meta = new Meta(schemaVersion); await context.AddNewProject(new Project(context) { Name = "Project 1" }); await context.SaveChangesAsync(); } }
public Entity(ScrumrContext context) : base(context) { }
public Sprint(ScrumrContext context) : base(context) { }
public Project(string name, ScrumrContext context) : base(context) { Name = name; }
public Project(ScrumrContext context) : base(context) { }
public Feature(ScrumrContext context) : base(context) { }
public Identifiable(ScrumrContext context) { Context = context; }
public Ticket(ScrumrContext context) : base(context) { }