Example #1
0
        public static Task RemoveAsync(this ICollection collection, string id, Action <RemoveOptions> configureOptions)
        {
            var options = new RemoveOptions();

            configureOptions(options);

            return(collection.RemoveAsync(id, options));
        }
Example #2
0
        public Task Remove(string id, Action <RemoveOptions> configureOptions)
        {
            var options = new RemoveOptions();

            configureOptions(options);

            return(Remove(id, options));
        }
Example #3
0
        public Task Remove(string id, Action <RemoveOptions> optionsAction)
        {
            var options = new RemoveOptions();

            optionsAction(options);

            return(Remove(id, options));
        }
Example #4
0
        public async Task Remove(string id, RemoveOptions options)
        {
            var removeOp = new Delete
            {
                Key               = id,
                Cas               = options.Cas,
                Cid               = Cid,
                DurabilityLevel   = options.DurabilityLevel,
                DurabilityTimeout = TimeSpan.FromMilliseconds(1500)
            };

            await ExecuteOp(removeOp, options.Token, options.Timeout).ConfigureAwait(false);
        }
Example #5
0
        public Task Remove(string id, TimeSpan?timeout     = null, ulong cas = 0,
                           PersistTo persistTo             = PersistTo.None, ReplicateTo replicateTo = ReplicateTo.None,
                           DurabilityLevel durabilityLevel = DurabilityLevel.None, CancellationToken token = default(CancellationToken))
        {
            var options = new RemoveOptions
            {
                Timeout         = timeout,
                Cas             = cas,
                PersistTo       = persistTo,
                ReplicateTo     = replicateTo,
                DurabilityLevel = durabilityLevel,
                Token           = token
            };

            return(Remove(id, options));
        }