Example #1
0
 public CSVariableDeclaration(CSType type, string name, ICSExpression value = null)
     : this(type, new CSIdentifier(name), value)
 {
 }
Example #2
0
 public CSVariableDeclaration(CSType type, CSIdentifier name, ICSExpression value = null)
     : this(type, new CSBinding [] { new CSBinding(name, value) })
 {
 }
 public CSLambda(ICSExpression value, params string [] parameters)
     : this(new CSParameterList(parameters.Select(p => new CSParameter(CSSimpleType.Void, new CSIdentifier(p)))), value)
 {
 }
 public CSLambda(CSParameterList parameters, ICSExpression value)
 {
     Parameters = parameters ?? new CSParameterList();
     Value      = Exceptions.ThrowOnNull(value, "value");
     Body       = null;
 }
Example #5
0
 public CSBinding(CSIdentifier name, ICSExpression val = null, bool onOwnLine = false)
 {
     Name      = name;
     Value     = val;
     OnOwnLine = onOwnLine;
 }
Example #6
0
 public CSBinaryExpression(CSBinaryOperator op, ICSExpression lhs, ICSExpression rhs)
 {
     Operation = op;
     Left      = Exceptions.ThrowOnNull(lhs, "lhs");
     Right     = Exceptions.ThrowOnNull(rhs, "rhs");
 }
 public CSReturn(ICSExpression expr)
 {
     Value = expr;
 }
Example #8
0
 public void Add(ICSExpression expr)
 {
     Add(new CSArgument(expr));
 }
Example #9
0
 public CSParenthesisExpression(ICSExpression within)
 {
     Within = Exceptions.ThrowOnNull(within, "within");
 }
 public static CSLine ReturnLine(ICSExpression expr)
 {
     return(new CSLine(new CSReturn(expr)));
 }
Example #11
0
 public CSCastExpression(CSType type, ICSExpression toCast)
 {
     Type   = Exceptions.ThrowOnNull(type, "type");
     ToCast = Exceptions.ThrowOnNull(toCast, "toCast");
 }
Example #12
0
 public CSCastExpression(string type, ICSExpression toCast)
     : this(new CSSimpleType(type), toCast)
 {
 }
Example #13
0
 public CSArgument(ICSExpression expr)
 {
     Value = Exceptions.ThrowOnNull(expr, nameof(expr));
 }
Example #14
0
 public static CSLine VarLine(CSType type, string name, ICSExpression value = null)
 {
     return(new CSLine(new CSVariableDeclaration(type, name, value)));
 }
Example #15
0
 public CSBinding(string name, ICSExpression val = null, bool onOwnLine = false)
     : this(new CSIdentifier(name), val, onOwnLine)
 {
 }
Example #16
0
 public CSFieldDeclaration(CSType type, string name, ICSExpression value = null, CSVisibility vis = CSVisibility.None, bool isSatic = false, bool isReadonly = false)
     : this(type, new CSIdentifier(name), value, vis, isSatic, isReadonly)
 {
 }
Example #17
0
 public CSUnaryExpression(CSUnaryOperator op, ICSExpression expr)
 {
     Operation = op;
     Expr      = Exceptions.ThrowOnNull(expr, nameof(expr));
 }