public static Task <IMutationResult> PrependAsync(this IBinaryCollection binaryCollection, string id, byte[] value, Action <PrependOptions> configureOptions) { var options = new PrependOptions(); configureOptions(options); return(binaryCollection.PrependAsync(id, value, options)); }
public async Task <IMutationResult> PrependAsync(string id, byte[] value, PrependOptions options) { using (var op = new Prepend <byte[]> { Cid = Cid, Key = id, Content = value, DurabilityLevel = options.DurabilityLevel, Transcoder = _transcoder }) { await _bucket.SendAsync(op, options.Token, options.Timeout); return(new MutationResult(op.Cas, null, op.MutationToken)); } }