本文整理汇总了C#中ChannelBindingKind类的典型用法代码示例。如果您正苦于以下问题:C# ChannelBindingKind类的具体用法?C# ChannelBindingKind怎么用?C# ChannelBindingKind使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChannelBindingKind类属于命名空间,在下文中一共展示了ChannelBindingKind类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetChannelBinding
public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
if (kind != ChannelBindingKind.Endpoint)
return null;
return binding;
}
示例2: GetChannelBinding
public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
if (kind != ChannelBindingKind.Endpoint)
{
throw new NotSupportedException(SR.GetString("net_listener_invalid_cbt_type", new object[] { kind.ToString() }));
}
return this.request.GetChannelBinding();
}
示例3: GetChannelBinding
public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
if (kind != ChannelBindingKind.Endpoint)
{
return null;
}
return this.binding;
}
示例4: GetChannelBinding
public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
if (kind != ChannelBindingKind.Endpoint)
{
throw new NotSupportedException(SR.Format(
SR.net_listener_invalid_cbt_type, kind.ToString()));
}
return _request.GetChannelBinding();
}
示例5: GetChannelBinding
public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
// WinHTTP only supports retrieval of ChannelBindingKind.Endpoint for CBT.
if (kind == ChannelBindingKind.Endpoint)
{
return _channelBinding;
}
return null;
}
示例6: QueryChannelBinding
internal static SafeChannelBindingHandle QueryChannelBinding(SafeSslHandle context, ChannelBindingKind bindingType)
{
SafeChannelBindingHandle bindingHandle;
switch (bindingType)
{
case ChannelBindingKind.Endpoint:
bindingHandle = new SafeChannelBindingHandle(bindingType);
QueryEndPointChannelBinding(context, bindingHandle);
break;
case ChannelBindingKind.Unique:
bindingHandle = new SafeChannelBindingHandle(bindingType);
QueryUniqueChannelBinding(context, bindingHandle);
break;
default:
// Keeping parity with windows, we should return null in this case.
bindingHandle = null;
break;
}
return bindingHandle;
}
示例7: QueryContextChannelBinding
public unsafe int QueryContextChannelBinding(SafeDeleteContext phContext, ChannelBindingKind attribute, out SafeFreeContextBufferChannelBinding refHandle)
{
refHandle = SafeFreeContextBufferChannelBinding.CreateEmptyHandle();
// Bindings is on the stack, so there's no need for a fixed block.
Bindings bindings = new Bindings();
int errorCode = SafeFreeContextBufferChannelBinding.QueryContextChannelBinding(phContext, (Interop.Secur32.ContextAttribute)attribute, &bindings, refHandle);
if (errorCode != 0)
{
GlobalLog.Leave("QueryContextChannelBinding", "ERROR = " + ErrorDescription(errorCode));
refHandle = null;
}
return errorCode;
}
示例8: GetChannelBinding
internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
ChannelBinding binding = null;
if (this.m_SecurityContext != null)
{
binding = SSPIWrapper.QueryContextChannelBinding(GlobalSSPI.SSPISecureChannel, this.m_SecurityContext, (ContextAttribute) kind);
}
return binding;
}
示例9: GetChannelBinding
internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
if (NetEventSource.IsEnabled) NetEventSource.Enter(this, kind);
ChannelBinding result = null;
if (_securityContext != null)
{
result = SslStreamPal.QueryContextChannelBinding(_securityContext, kind);
}
if (NetEventSource.IsEnabled) NetEventSource.Exit(this, result);
return result;
}
示例10: GetChannelBinding
internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
return null;
}
示例11: QueryContextChannelBinding
public unsafe static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SafeDeleteContext securityContext, ChannelBindingKind attribute)
{
return SSPIWrapper.QueryContextChannelBinding(GlobalSSPI.SSPISecureChannel, securityContext, (Interop.SspiCli.ContextAttribute)attribute);
}
示例12: QueryContextChannelBinding
internal static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ChannelBindingKind contextAttribute)
{
GlobalLog.Enter("QueryContextChannelBinding", contextAttribute.ToString());
SafeFreeContextBufferChannelBinding result;
int errorCode = SecModule.QueryContextChannelBinding(securityContext, contextAttribute , out result);
if (result != null)
{
GlobalLog.Leave("QueryContextChannelBinding", Logging.HashString(result));
}
return result;
}
示例13: GetChannelBinding
internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
{
return (Context == null) ? null : Context.GetChannelBinding(kind);
}
示例14: QueryContextChannelBinding
public static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SafeDeleteContext securityContext, ChannelBindingKind attribute)
{
SafeChannelBindingHandle bindingHandle = Interop.OpenSsl.QueryChannelBinding(securityContext.SslContext, attribute);
var refHandle = bindingHandle == null ? null : new SafeFreeContextBufferChannelBinding(bindingHandle);
return refHandle;
}
示例15: QueryContextChannelBinding
public int QueryContextChannelBinding(SafeDeleteContext phContext, ChannelBindingKind attribute,
out SafeFreeContextBufferChannelBinding refHandle)
{
throw NotImplemented.ByDesignWithMessage(SR.net_MethodNotImplementedException);
}