Пример #1
0
		void IVisitorWithContext.Visit(UIOptionGroupType optionGroup, object context)
		{
			XmlNode optionGroupNode = (XmlNode) context;

			VisitOptionBaseType(optionGroup, context);

			//Default XML just contains 1 child node for option Groups. Create a dummy instance and put the option group defs in it to give the user a template of what it will look like

			UIOptionGroupInstanceType instance = new UIOptionGroupInstanceType();
			instance.Name = "InstanceTemplate";
			optionGroup.OptionGroupInstances.Add(instance);
			instance.Accept(this, optionGroupNode);
		}
Пример #2
0
		void IVisitorWithContext.Visit(UIOptionGroupType optionGroup, object context)
		{
			XmlNode optionGroupNode = (XmlNode) context;

			VisitOptionBaseType(optionGroup, context);

			foreach (XmlNode node in optionGroupNode.ChildNodes)
			{
				UIOptionGroupInstanceType instance = new UIOptionGroupInstanceType();
				optionGroup.OptionGroupInstances.Add(instance);
				instance.Accept(this, node);
			}			
		}