Reads a cookie.
Namespace: Microsoft.IdentityModel.Web
Assembly: Microsoft.IdentityModel (in
microsoft.identitymodel.dll)
Usage
Visual Basic |
Dim instance As CookieHandler
Dim name As String
Dim context As HttpContext
Dim returnValue As Byte()
returnValue = instance.Read(name, context)
|
Syntax
Visual Basic |
Public Function Read ( _
name As String, _
context As HttpContext _
) As Byte()
|
C# |
public byte[] Read (
string name,
HttpContext context
)
|
C++ |
public:
array<unsigned char>^ Read (
String^ name,
HttpContext^ context
)
|
J# |
public byte[] Read (
String name,
HttpContext context
)
|
JScript |
public function Read (
name : String,
context : HttpContext
) : byte[]
|
Parameters
- name
-
Name for the cookie
- context
-
HttpContext for the request
Return Value
The cookie value, or null if the cookie was not found
Exceptions
Exception type |
Condition |
ArgumentNullException
|
When name is null or empty
|
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
Windows Server 2003, Windows Vista
Target Platforms
Windows Server 2008, Windows Vista, Not tested on Windows XP
See Also