Share via


ICustomProvider.Update Method

Updates an entry in the store.

Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Core (in microsoft.applicationserver.caching.core.dll)

Usage

'Usage
Dim instance As ICustomProvider
Dim transactionContext As Object
Dim type As String
Dim key As String
Dim data As Byte()
Dim oldVersion As Long
Dim returnValue As Boolean

returnValue = instance.Update(transactionContext, type, key, data, oldVersion)

Syntax

'Declaration
Function Update ( _
    transactionContext As Object, _
    type As String, _
    key As String, _
    data As Byte(), _
    oldVersion As Long _
) As Boolean
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
)
boolean Update (
    Object transactionContext, 
    String type, 
    String key, 
    byte[] data, 
    long oldVersion
)
function Update (
    transactionContext : Object, 
    type : String, 
    key : String, 
    data : byte[], 
    oldVersion : long
) : boolean

Parameters

  • transactionContext
    The transaction context object.
  • type
    The type of the entry.
  • key
    The key of the entry.
  • data
    The updated value of the entry.
  • oldVersion
    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

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Visual Studio 2010 and later, .NET Framework 4

Target Platforms

Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2

See Also

Reference

ICustomProvider Interface
ICustomProvider Members
Microsoft.ApplicationServer.Caching Namespace

  ff425062(v=azure.10).md 2011-08-26