CouchbaseBucket Replace T  Method (String, T, UInt64, TimeSpan)Couchbase .NET SDK 2.0
Replaces a document for a given key if it exists, otherwise fails.

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

Parameters

key
Type: System String
The unique key for indexing.
value
Type: T
The value for the key.
cas
Type: System UInt64
The CAS (Check and Set) value for optimistic concurrency.
expiration
Type: System TimeSpan
The time-to-live (ttl) for the key.
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, TimeSpan)
See Also