ICustomProvider.Update Method (Object, String, String, Byte , Int64)

 

Updates an entry in the store.

Namespace:   Microsoft.ApplicationServer.Caching
Assembly:  Microsoft.ApplicationServer.Caching.Core (in Microsoft.ApplicationServer.Caching.Core.dll)

Syntax

bool Update(
    object transactionContext,
    string type,
    string key,
    byte[] data,
    long oldVersion
)
bool Update(
    Object^ transactionContext,
    String^ type,
    String^ key,
    array<unsigned char>^ data,
    long long oldVersion
)
abstract Update : 
        transactionContext:Object *
        type:string *
        key:string *
        data:byte[] *
        oldVersion:int64 -> bool
Function Update (
    transactionContext As Object,
    type As String,
    key As String,
    data As Byte(),
    oldVersion As Long
) As Boolean

Parameters

  • transactionContext
    Type: System.Object

    The transaction context object.

  • data
    Type: System.Byte[]

    The updated value of the entry.

  • oldVersion
    Type: System.Int64

    The version of the entry. If this value is less than or equal to 0, the update occurs regardless of the version. If this value is greater than 0, then the update is only performed if the version of the entry matches the version provided.

Return Value

Type: System.Boolean

Returns Boolean. If the update succeeds, the return value is true. If the entry does not exist or if the version does not match, the return value is false.

Remarks

Any unexpected errors should throw a ConfigStoreException exception.

See Also

ICustomProvider Interface
Microsoft.ApplicationServer.Caching Namespace

Return to top