public TypeContext(DataBase dataBase, IEnumerable <TypeInfo> typeInfos) { this.dataBase = dataBase; this.repository = dataBase.Repository; this.BasePath = Path.Combine(dataBase.BasePath, CremaSchema.TypeDirectory); this.Initialize(typeInfos); this.UserContext.Dispatcher.Invoke(() => this.UserContext.Users.UsersLoggedOut += UserCollection_UsersLoggedOut); this.CremaHost.Debug("TypeContext is created."); }
public TableContext(DataBase dataBase, IEnumerable <TableInfo> tableInfos) { this.dataBase = dataBase; this.repository = dataBase.Repository; this.CremaHost.Debug(Resources.Message_TableContextInitialize); this.BasePath = Path.Combine(dataBase.BasePath, CremaSchema.TableDirectory); this.Tables.TypeReference = dataBase.TypeContext.Types; this.Initialize(tableInfos); this.UserContext.Dispatcher.Invoke(() => this.UserContext.Users.UsersLoggedOut += UserCollection_UsersLoggedOut); this.CremaHost.Debug(Resources.Message_TableContextIsCreated); }
public DataBaseTransaction(Authentication authentication, DataBase dataBase, Guid id) { this.authentication = authentication; this.dataBase = dataBase; this.ID = id; this.dataBase.Dispatcher.VerifyAccess(); this.repository = dataBase.Repository; this.typeInfos = dataBase.TypeContext.Types.Select((Type item) => item.TypeInfo).ToArray(); this.tableInfos = dataBase.TableContext.Tables.Select((Table item) => item.TableInfo).ToArray(); this.transactionPath = this.CremaHost.GetPath(CremaPath.Transactions, $"{dataBase.ID}"); this.domainPath = this.CremaHost.GetPath(CremaPath.Domains, $"{dataBase.ID}"); this.authentication.Expired += Authentication_Expired; }