Share via


DataCacheSessionStoreProvider.GetItemExclusive Method

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Returns and locks the read-only session-state data from the cache.

Namespace: Microsoft.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)

Syntax

'Declaration
Public Overrides Function GetItemExclusive ( _
    context As HttpContext, _
    id As String, _
    <OutAttribute> ByRef locked As Boolean, _
    <OutAttribute> ByRef lockAge As TimeSpan, _
    <OutAttribute> ByRef lockId As Object, _
    <OutAttribute> ByRef actions As SessionStateActions _
) As SessionStateStoreData
'Usage
Dim instance As DataCacheSessionStoreProvider
Dim context As HttpContext
Dim id As String
Dim locked As Boolean
Dim lockAge As TimeSpan
Dim lockId As Object
Dim actions As SessionStateActions
Dim returnValue As SessionStateStoreData

returnValue = instance.GetItemExclusive(context, id, locked, lockAge, lockId, actions)
public override SessionStateStoreData GetItemExclusive (
    HttpContext context,
    string id,
    out bool locked,
    out TimeSpan lockAge,
    out Object lockId,
    out SessionStateActions actions
)
public:
virtual SessionStateStoreData^ GetItemExclusive (
    HttpContext^ context, 
    String^ id, 
    [OutAttribute] bool% locked, 
    [OutAttribute] TimeSpan% lockAge, 
    [OutAttribute] Object^% lockId, 
    [OutAttribute] SessionStateActions% actions
) override
public SessionStateStoreData GetItemExclusive (
    HttpContext context, 
    String id, 
    /** @attribute OutAttribute() */ /** @ref */ boolean locked, 
    /** @attribute OutAttribute() */ /** @ref */ TimeSpan lockAge, 
    /** @attribute OutAttribute() */ /** @ref */ Object lockId, 
    /** @attribute OutAttribute() */ /** @ref */ SessionStateActions actions
)
JScript does not support passing value-type arguments by reference.

Parameters

  • context
    The HttpContext of the current request.
  • id
    The session identifier for the current request.
  • locked
    When this method returns, contains a Boolean value that is set to true if a lock in the cache is successfully obtained; otherwise, false.
  • lockAge
    When this method returns, contains a TimeSpan object that is set to the period of time that an item in the cache has been locked.
  • lockId
    When this method returns, contains an object that is set to the lock identifier for the current request.
  • actions
    When this method returns, contains one of the SessionStateActions values. This indicates whether the current session is an uninitialized, cookieless session.

Return Value

A SessionStateStoreData object populated with session values and information from the cache.

Remarks

For more information, see the documentation for the base class SessionStateStoreProviderBase.

See Also

Reference

DataCacheSessionStoreProvider Class
DataCacheSessionStoreProvider Members
Microsoft.Data.Caching Namespace