ContextMessageProperty.TryCreateFromHttpCookieHeader 方法

定义

尝试从指定 HTTP Cookie 的键/值对实例化 ContextMessageProperty

public:
 static bool TryCreateFromHttpCookieHeader(System::String ^ httpCookieHeader, [Runtime::InteropServices::Out] System::ServiceModel::Channels::ContextMessageProperty ^ % context);
public static bool TryCreateFromHttpCookieHeader (string httpCookieHeader, out System.ServiceModel.Channels.ContextMessageProperty context);
static member TryCreateFromHttpCookieHeader : string * ContextMessageProperty -> bool
Public Shared Function TryCreateFromHttpCookieHeader (httpCookieHeader As String, ByRef context As ContextMessageProperty) As Boolean

参数

httpCookieHeader
String

要从中初始化 context 属性值的 HTTP Cookie 标头的名称。

context
ContextMessageProperty

如果此方法返回 true 时,则 context 将包含一个 ContextMessageProperty,其中包含与 ContextMessageProperty 关联的 httpCookieHeader。 此参数未经初始化即被传递。

返回

当从 true 中获取 ContextMessageProperty 的值时为 httpCookieHeader,否则为 false

例外

httpCookieHeadernull

适用于