CreateChannelAsLoggedOnUser创建 WCF 通道,使用作为令牌。作为令牌表示进程标识 (使用者) 和用户标识。此标记委派给后端服务器的用户的标识。委派,则操作。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<ExtensionAttribute> _
Public Shared Function CreateChannelActingAsLoggedOnUser(Of TChannel) ( _
factory As ChannelFactory(Of TChannel) _
) As TChannel
用法
Dim factory As ChannelFactory(Of TChannel)
Dim returnValue As TChannel
returnValue = factory.CreateChannelActingAsLoggedOnUser()
public static TChannel CreateChannelActingAsLoggedOnUser<TChannel>(
this ChannelFactory<TChannel> factory
)
类型参数
- TChannel
用于创建通道ChannelFactory 。
参数
factory
类型:System.ServiceModel.ChannelFactory<TChannel>The ChannelFactory used to create the channel.
返回值
类型:TChannel
Returns [{0}].
使用注释
在 Visual Basic 和 C# 中,您可以在类型为 ChannelFactory<TChannel> 的任何对象上调用此方法作为实例方法。当您使用实例方法语法调用此方法时,请省略第一个参数。有关详细信息,请参阅 https://msdn.microsoft.com/zh-cn/library/bb384936(v=office.15) 或 https://msdn.microsoft.com/zh-cn/library/bb383977(v=office.15)。