/// <summary>Implements IDomainModelEnablesRulesAfterDeserialization.EnableRulesAfterDeserialization</summary> protected void EnableRulesAfterDeserialization(Microsoft.VisualStudio.Modeling.Store store) { RelationalShapeDomainModel.EnableDiagramRules(store); Microsoft.VisualStudio.Modeling.RuleManager ruleManager = store.RuleManager; Type[] disabledRuleTypes = RelationalShapeDomainModel.InitiallyDisabledRuleTypes; for (int i = 0; i < 7; ++i) { ruleManager.EnableRule(disabledRuleTypes[i]); } }
/// <summary>Implements ICustomSerializedDomainModel.ShouldSerializeDomainClass</summary> protected bool ShouldSerializeDomainClass(Store store, DomainClassInfo classInfo) { Dictionary <DomainClassInfo, object> omissions = this.myCustomSerializationOmissions; if (omissions == null) { omissions = RelationalShapeDomainModel.BuildCustomSerializationOmissions(store); this.myCustomSerializationOmissions = omissions; } return(!omissions.ContainsKey(classInfo)); }