/// <summary>Implements IDomainModelEnablesRulesAfterDeserialization.EnableRulesAfterDeserialization</summary> protected void EnableRulesAfterDeserialization(Microsoft.VisualStudio.Modeling.Store store) { BarkerERShapeDomainModel.EnableDiagramRules(store); Microsoft.VisualStudio.Modeling.RuleManager ruleManager = store.RuleManager; Type[] disabledRuleTypes = BarkerERShapeDomainModel.InitiallyDisabledRuleTypes; for (int i = 0; i < 5; ++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 = BarkerERShapeDomainModel.BuildCustomSerializationOmissions(store); this.myCustomSerializationOmissions = omissions; } return !omissions.ContainsKey(classInfo); }