SPChannelFactoryOperations.CreateChannelAsProcess<TChannel> 方法 (ChannelFactory<TChannel>, EndpointAddress, Uri)

Creates a channel that is used to send messages to a service as the current process identity with the specified kind of channel, factory, endpoint address, and URI.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
<ExtensionAttribute> _
Public Shared Function CreateChannelAsProcess(Of TChannel) ( _
    factory As ChannelFactory(Of TChannel), _
    address As EndpointAddress, _
    via As Uri _
) As TChannel
用法
Dim factory As ChannelFactory(Of TChannel)
Dim address As EndpointAddress
Dim via As Uri
Dim returnValue As TChannel

returnValue = factory.CreateChannelAsProcess(address, _
    via)
public static TChannel CreateChannelAsProcess<TChannel>(
    this ChannelFactory<TChannel> factory,
    EndpointAddress address,
    Uri via
)

类型参数

  • TChannel
    The kind of channel to configure.

参数

  • via
    类型:System.Uri

    The [Uri] that contains the transport address to which the channel sends messages.

返回值

类型:TChannel
The TChannel of type [IChannel] created by the factory.

使用注释

在 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)

另请参阅

引用

SPChannelFactoryOperations 类

SPChannelFactoryOperations 成员

CreateChannelAsProcess 重载

Microsoft.SharePoint 命名空间