CouchbaseBucket.Replace<T> Method (String, T, UInt64, ReplicateTo)Couchbase .NET SDK 2.0
Replaces a value for a key if it exists, otherwise fails.

Namespace: Couchbase
Assembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public IOperationResult<T> Replace<T>(
	string key,
	T value,
	ulong cas,
	ReplicateTo replicateTo
)

Parameters

key
Type: System.String
The unique key for indexing.
value
Type: T
The value for the key.
cas
Type: System.UInt64
replicateTo
Type: Couchbase.ReplicateTo
The durability requirement for replication.
Type Parameters
T
The Type of the value to be inserted.

Return Value

Type: IOperationResult<T>
An object implementing the IOperationResult<T>interface.

Implements

IBucket.Replace<T>(String, T, UInt64, ReplicateTo)
See Also