public IDatabase CreateDatabase(Domain domain, bool init) { var domainAssembly = typeof(C1).Assembly; var properties = new[] { new PropertyDefinition("allors.database.sql.connection", "Integrated Security=SSPI;Data Source=(local);Initial Catalog=adapters;", "System.String"), new PropertyDefinition("allors.database.sqlclient.isolation.level", "Snapshot", "System.Data.IsolationLevel, System.Data") }; var database = new Database.SqlClient.LongId.Database(domain, domainAssembly, Guid.NewGuid(), properties); if (init) { database.Init(); } return database; }
protected override IDatabase CreateDatabase(Domain domain, bool init) { return this.profile.CreateDatabase(domain, init); }
internal void OnDomainCreated(Domain domain) { this.domains.Add(domain); this.metaObjectById.Add(domain.Id, domain); this.Stale(); }
private void DeriveSuperdomains(Domain subdomain, HashSet<Domain> superdomains) { if (this.Equals(subdomain)) { // We have a cycle return; } superdomains.Add(this); foreach (var directSuperdomain in this.DirectSuperdomains) { if (!superdomains.Contains(directSuperdomain)) { directSuperdomain.DeriveSuperdomains(subdomain, superdomains); } } }
public void AddDirectSuperdomain(Domain superdomain) { if (superdomain.Equals(this) || superdomain.Superdomains.Contains(this)) { throw new Exception("Cyclic in domain inheritance"); } this.directSuperdomains.Add(superdomain); this.MetaPopulation.Stale(); }
public static Interface CreateInterface(Domain domain, string name) { return new InterfaceBuilder(domain, Guid.NewGuid()).WithSingularName(name).WithPluralName(name + "s").Build(); }
public static Class CreateClass(Domain domain, string name) { return new ClassBuilder(domain, Guid.NewGuid()).WithSingularName(name).WithPluralName(name + "s").Build(); }