Exemple #1
0
 private void CreateModelRulesFromClassAttributes(ModelArtifactStateNodeWrapper wrapper, ITypeInfo typeInfo)
 {
     foreach (ArtifactStateRuleAttribute attribute in ArtifactStateRuleManager.FindAttributes(typeInfo))
     {
         wrapper.AddRule <ControllerStateRuleNodeWrapper>(attribute, typeInfo);
     }
 }
 private void CreateModelRulesFromMethodsAttributes(ModelArtifactStateNodeWrapper wrapper, ITypeInfo typeInfo)
 {
     foreach (MethodInfo methodInfo in typeInfo.Type.GetMethods(ArtifactStateRuleManager.MethodRuleBindingFlags)){
         foreach (ArtifactStateRuleAttribute attribute in ArtifactStateRuleManager.FindAttributes(methodInfo)){
             wrapper.AddRule<ControllerStateRuleNodeWrapper>(attribute, typeInfo);
         }
     }
 }
Exemple #3
0
 private void CreateModelRulesFromMethodsAttributes(ModelArtifactStateNodeWrapper wrapper, ITypeInfo typeInfo)
 {
     foreach (MethodInfo methodInfo in typeInfo.Type.GetMethods(ArtifactStateRuleManager.MethodRuleBindingFlags))
     {
         foreach (ArtifactStateRuleAttribute attribute in ArtifactStateRuleManager.FindAttributes(methodInfo))
         {
             wrapper.AddRule <ControllerStateRuleNodeWrapper>(attribute, typeInfo);
         }
     }
 }
Exemple #4
0
        public override void UpdateModel(Dictionary model)
        {
            base.UpdateModel(model);
            ModelArtifactStateNodeWrapper wrapper = ModelArtifactStateModule.CreateModelWrapper(model);

            foreach (ITypeInfo typeInfo in XafTypesInfo.Instance.PersistentTypes)
            {
                CreateModelRulesFromClassAttributes(wrapper, typeInfo);
                CreateModelRulesFromMethodsAttributes(wrapper, typeInfo);
            }
        }
 private void CreateModelRulesFromClassAttributes(ModelArtifactStateNodeWrapper wrapper, ITypeInfo typeInfo)
 {
     foreach (ArtifactStateRuleAttribute attribute in ArtifactStateRuleManager.FindAttributes(typeInfo)){
         wrapper.AddRule<ControllerStateRuleNodeWrapper>(attribute, typeInfo);
     }
 }