private void BuildExceptionTypeNode(ExceptionPolicyNode policyNode, ExceptionTypeData exceptionTypeData)
		{
			ExceptionTypeNode exceptionTypeNode = new ExceptionTypeNode(exceptionTypeData);
			policyNode.AddNode(exceptionTypeNode);				
			foreach (ExceptionHandlerData exceptionHandlerData in exceptionTypeData.ExceptionHandlers)
			{
				BuildExceptionHandlerNode(exceptionTypeNode, exceptionHandlerData);
			}			
		}
		private void BuildExceptionPolicyNode(ExceptionHandlingSettingsNode node, ExceptionPolicyData policyData)
		{
			ExceptionPolicyNode policyNode = new ExceptionPolicyNode(policyData);
			node.AddNode(policyNode);
			foreach (ExceptionTypeData exceptionTypeData in policyData.ExceptionTypes)
			{
				BuildExceptionTypeNode(policyNode, exceptionTypeData);
			}			
		}
 private ExceptionPolicyData CreateExceptionPolicyData(ExceptionPolicyNode policyNode)
 {
     ExceptionPolicyData policyData = new ExceptionPolicyData(policyNode.Name);
     IList<ConfigurationNode> exceptionTypes = hierarchy.FindNodesByType(policyNode, typeof(ExceptionTypeNode));
     foreach (ConfigurationNode exceptionTypeNode in exceptionTypes)
     {
         policyData.ExceptionTypes.Add(CreateExceptionTypeData((ExceptionTypeNode)exceptionTypeNode));
     }
     return policyData;
 }
Пример #4
0
        private void BuildExceptionTypeNode(ExceptionPolicyNode policyNode, ExceptionTypeData exceptionTypeData)
        {
            ExceptionTypeNode exceptionTypeNode = new ExceptionTypeNode(exceptionTypeData);

            policyNode.AddNode(exceptionTypeNode);
            foreach (ExceptionHandlerData exceptionHandlerData in exceptionTypeData.ExceptionHandlers)
            {
                BuildExceptionHandlerNode(exceptionTypeNode, exceptionHandlerData);
            }
        }
Пример #5
0
        private void BuildExceptionPolicyNode(ExceptionHandlingSettingsNode node, ExceptionPolicyData policyData)
        {
            ExceptionPolicyNode policyNode = new ExceptionPolicyNode(policyData);

            node.AddNode(policyNode);
            foreach (ExceptionTypeData exceptionTypeData in policyData.ExceptionTypes)
            {
                BuildExceptionTypeNode(policyNode, exceptionTypeData);
            }
        }
Пример #6
0
        private ExceptionPolicyData CreateExceptionPolicyData(ExceptionPolicyNode policyNode)
        {
            ExceptionPolicyData       policyData     = new ExceptionPolicyData(policyNode.Name);
            IList <ConfigurationNode> exceptionTypes = hierarchy.FindNodesByType(policyNode, typeof(ExceptionTypeNode));

            foreach (ConfigurationNode exceptionTypeNode in exceptionTypes)
            {
                policyData.ExceptionTypes.Add(CreateExceptionTypeData((ExceptionTypeNode)exceptionTypeNode));
            }
            return(policyData);
        }
Пример #7
0
 public void ExceptionPolicyNodeDefaults()
 {
     ExceptionPolicyNode policyNode = new ExceptionPolicyNode();
     Assert.AreEqual("Exception Policy", policyNode.Name);
 }