Writes a cookie.
Пространство имен: Microsoft.IdentityModel.Web
Сборка: Microsoft.IdentityModel (в microsoft.identitymodel.dll)

Использование

Visual Basic
Dim instance As CookieHandler
Dim value As Byte()
Dim name As String
Dim path As String
Dim domain As String
Dim expirationTime As DateTime
Dim requiresSsl As Boolean
Dim hideFromClientScript As Boolean
Dim context As HttpContext

instance.Write(value, name, path, domain, expirationTime, requiresSsl, hideFromClientScript, context)

Синтаксис

Visual Basic
Public Sub Write ( _
		value As Byte(), _
		name As String, _
		path As String, _
		domain As String, _
		expirationTime As DateTime, _
		requiresSsl As Boolean, _
		hideFromClientScript As Boolean, _
		context As HttpContext _
)
C#
public void Write (
		byte[] value,
		string name,
		string path,
		string domain,
		DateTime expirationTime,
		bool requiresSsl,
		bool hideFromClientScript,
		HttpContext context
)
C++
public:
void Write (
		array<unsigned char>^ value, 
		String^ name, 
		String^ path, 
		String^ domain, 
		DateTime expirationTime, 
		bool requiresSsl, 
		bool hideFromClientScript, 
		HttpContext^ context
)
J#
public void Write (
		byte[] value, 
		String name, 
		String path, 
		String domain, 
		DateTime expirationTime, 
		boolean requiresSsl, 
		boolean hideFromClientScript, 
		HttpContext context
)
JScript
public function Write (
		value : byte[], 
		name : String, 
		path : String, 
		domain : String, 
		expirationTime : DateTime, 
		requiresSsl : boolean, 
		hideFromClientScript : boolean, 
		context : HttpContext
)

Параметры

value

Value for the cookie

name

Name for the cookie

path

Path for the cookie

domain

Domain for the cookie

expirationTime

Expiration time for the cookie, or MinValue for a session cookie

requiresSsl
hideFromClientScript
context

HttpContext for the request

Исключения

Тип исключений Условие
ArgumentNullException

When name is null or empty

-or-

When value is null or empty

Безопасность потоков

Любые открытые статические члены (Shared в Visual Basic) этого типа являются поточно-ориентированными.Любые члены экземпляров не являются гарантированно поточно-ориентированными.

Платформы

Платформа разработки

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2008, Windows Vista, Not tested on Windows XP

См. также