Inheritance: ORMSolutions.ORMArchitect.Framework.Shell.IDomainModelEnablesRulesAfterDeserialization
コード例 #1
0
 /// <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]);
     }
 }
コード例 #2
0
        /// <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));
        }