public ConditionIntRange( XElement el ) { if( el == null ) throw new ArgumentNullException( "el" ); Field = (ConditionField)Enum.Parse( typeof( ConditionField ), el.Attribute( "field" ).Value, true ); Value = Int32.Parse( el.Attribute( "val" ).Value ); if( el.Attribute( "op" ) != null ) { Comparison = (ComparisonOperation)Enum.Parse( typeof( ComparisonOperation ), el.Attribute( "op" ).Value, true ); } if( el.Attribute( "scope" ) != null ) { Scope = (ConditionScopeType)Enum.Parse( typeof( ConditionScopeType ), el.Attribute( "scope" ).Value, true ); } }
public ConditionIntRange(XElement el) { if (el == null) { throw new ArgumentNullException("el"); } Field = (ConditionField)Enum.Parse(typeof(ConditionField), el.Attribute("field").Value, true); Value = Int32.Parse(el.Attribute("val").Value); if (el.Attribute("op") != null) { Comparison = (ComparisonOperation)Enum.Parse(typeof(ComparisonOperation), el.Attribute("op").Value, true); } if (el.Attribute("scope") != null) { Scope = (ConditionScopeType)Enum.Parse(typeof(ConditionScopeType), el.Attribute("scope").Value, true); } }