Share via


TeamFoundationRequestContext.GetSessionValue Method

[GetSessionValue] will examine the current request context and return the value for the supplied [sessionKey]. Sessions may be supported by the specific type of request context. This means that the caller must work even when sessions are not supported.

If the request context supports sessions, it will maintain the values between calls for a given session. A session is often a process run by a single user where the server wants to allow the client to re-use a value for the duration of the process.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Overridable Function GetSessionValue ( _
    sessionKey As String, _
    <OutAttribute> ByRef sessionValue As String _
) As Boolean
public virtual bool GetSessionValue(
    string sessionKey,
    out string sessionValue
)
public:
virtual bool GetSessionValue(
    String^ sessionKey, 
    [OutAttribute] String^% sessionValue
)
abstract GetSessionValue : 
        sessionKey:string * 
        sessionValue:string byref -> bool  
override GetSessionValue : 
        sessionKey:string * 
        sessionValue:string byref -> bool
public function GetSessionValue(
    sessionKey : String, 
    sessionValue : String
) : boolean

Parameters

  • sessionValue
    Type: System.String%

    Value to be associated with this session key.

Return Value

Type: System.Boolean
[True] if the value was retrieved from the session. [False] if sessions are not supported or the value wasn't present.

.NET Framework Security

See Also

Reference

TeamFoundationRequestContext Class

Microsoft.TeamFoundation.Framework.Server Namespace