Beispiel #1
0
 public UpdateExpression(UpdateOperator op, Expression argument, bool prefix, Location location = null) :
     base(SyntaxNodeType.UpdateExpression, location)
 {
     if (!FastEnumValidator <UpdateOperator> .IsDefined((int)op))
     {
         throw new ArgumentOutOfRangeException("op");
     }
     if (argument == null)
     {
         throw new ArgumentNullException("argument");
     }
     Operator = op;
     Argument = argument;
     Prefix   = prefix;
 }
Beispiel #2
0
 public AssignmentExpression(AssignmentOperator op, Expression left, Expression right, Location location = null) :
     base(SyntaxNodeType.AssignmentExpression, location)
 {
     if (!FastEnumValidator <AssignmentOperator> .IsDefined((int)op))
     {
         throw new ArgumentOutOfRangeException("op");
     }
     if (left == null)
     {
         throw new ArgumentNullException("left");
     }
     if (right == null)
     {
         throw new ArgumentNullException("right");
     }
     Operator = op;
     Left     = left;
     Right    = right;
 }
Beispiel #3
0
 public Property(PropertyKind kind, IPropertyKeyExpression key, Expression value, Location location = null) :
     base(SyntaxNodeType.Property, location)
 {
     if (!FastEnumValidator <PropertyKind> .IsDefined((int)kind))
     {
         throw new ArgumentOutOfRangeException("kind");
     }
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     Value = value;
     Key   = key;
     Kind  = kind;
 }