public static string JsText(this UpdateOperator op) { switch (op) { case UpdateOperator.Increment: return("++"); case UpdateOperator.Decrement: return("--"); default: throw new NotSupportedException(); } }
public CollectionOperators(DeleteOperator <T> deleteOperator, ReplaceOperator <T> replaceOperator, InsertOperator <T> insertOperator, QueryOperator <T> queryOperator, UpdateOperator <T> updateOperator) { Delete = deleteOperator; Replace = replaceOperator; Insert = insertOperator; Query = queryOperator; Update = updateOperator; }
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; }
private static CollectionOperators <TDocumentRoot> CreateCollectionOperators <TInterface, TConcrete, TDocumentRoot>( IMongoCollection <TDocumentRoot> mongoCollection, IServiceProvider provider) where TDocumentRoot : class, IDocumentRoot where TConcrete : CallistoCollection <TDocumentRoot>, TInterface { var deleteOperator = new DeleteOperator <TDocumentRoot>(mongoCollection, provider.GetRequiredService <ICallistoDeleteOperationFactory>()); var replaceOperator = new ReplaceOperator <TDocumentRoot>(mongoCollection, provider.GetRequiredService <ICallistoReplaceOperationFactory>()); var queryOperator = new QueryOperator <TDocumentRoot>(mongoCollection, provider.GetRequiredService <ICallistoQueryOperationFactory>()); var updateOperator = new UpdateOperator <TDocumentRoot>(mongoCollection, provider.GetRequiredService <ICallistoUpdateOperationFactory>()); var insertOperator = new InsertOperator <TDocumentRoot>(mongoCollection, provider.GetRequiredService <ICallistoInsertOperationFactory>()); var operators = new CollectionOperators <TDocumentRoot>(deleteOperator, replaceOperator, insertOperator, queryOperator, updateOperator); return(operators); }
public PrefixUpdateExpression(AbstractUnaryExpression unaryExpression, UpdateOperator updateOperation, bool isStrictMode) : base(isStrictMode) { this.unaryExpression = unaryExpression; this.updateOperation = updateOperation; }
public PostfixUpdateExpression(AbstractLeftHandSideExpression leftHandSideExpression, UpdateOperator updateOperation, bool isStrictMode) : base(isStrictMode) { this.leftHandSideExpression = leftHandSideExpression; this.updateOperation = updateOperation; }
public TestUpdate(UpdateOperator op, TestNode argument) { argumentNode = argument; this.op = op; }
public static UpdateExpression Update(UpdateOperator op, Expression argument, Location location) { return(new UpdateExpression(op, argument, true, location)); }
public static UpdateExpression Postfix(UpdateOperator op, Expression argument, Location location) { return(new UpdateExpression(op, argument, false, location)); }
public UpdateExpression(Identifier argument, UpdateOperator op) { Argument = argument; Operator = op; }
public UpdateExpressionExecuter(UpdateExpression expr) : base(expr) { identifier = expr.Argument; op = expr.Operator; }