コード例 #1
0
        public override void Load(XmlElement element)
        {
            clrVersion = ClrVersion.Default;
            try {
                clrVersion = (ClrVersion)Enum.Parse(typeof(ClrVersion), element.GetAttribute("ClrVersion"), true);
            } catch (ArgumentException) {
                new InvalidOperationException("Invalid value for ClrVersion condition in template.");
            }

            condition = ClrVersionCondition.None;
            try {
                condition = (ClrVersionCondition)Enum.Parse(typeof(ClrVersionCondition), element.GetAttribute("Condition"), true);
            } catch (ArgumentException) {
                new InvalidOperationException("Invalid value for ClrVersionCondition condition in template.");
            }
        }
コード例 #2
0
		public override void Load (XmlElement element)
		{
			clrVersion = ClrVersion.Default;
			try {
				clrVersion = (ClrVersion) Enum.Parse (typeof (ClrVersion), element.GetAttribute ("ClrVersion"), true);
			} catch (ArgumentException) {
				new InvalidOperationException ("Invalid value for ClrVersion condition in template.");
			}
			
			condition = ClrVersionCondition.None;
			try {
				condition = (ClrVersionCondition) Enum.Parse (typeof (ClrVersionCondition), element.GetAttribute ("Condition"), true);
			} catch (ArgumentException) {
				new InvalidOperationException ("Invalid value for ClrVersionCondition condition in template.");
			}
		}