public ConditionIntRange(ConditionField field, ComparisonOp comparison, int value)
        {
            Field = field;

            Comparison = comparison;

            Value = value;
        }
Example #2
0
 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 );
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
 public ConditionIntRange( ConditionField field, ComparisonOp comparison, int value )
 {
     Field = field;
     Comparison = comparison;
     Value = value;
 }
Example #5
0
 public static string GetLongString(this ConditionField field)
 {
     return(ConditionFieldNames[field]);
 }