SPChannelFactoryOperations.CreateChannelAsProcess<TChannel> Method (ChannelFactory<TChannel>, EndpointAddress)
Creates a channel that is used to send messages to a service as the current process identity with the specified kind of channel and factory and endpoint address.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function CreateChannelAsProcess(Of TChannel) ( _
factory As ChannelFactory(Of TChannel), _
address As EndpointAddress _
) As TChannel
'Usage
Dim factory As ChannelFactory(Of TChannel)
Dim address As EndpointAddress
Dim returnValue As TChannel
returnValue = factory.CreateChannelAsProcess(address)
public static TChannel CreateChannelAsProcess<TChannel>(
this ChannelFactory<TChannel> factory,
EndpointAddress address
)
Type Parameters
- TChannel
The kind of channel to configure.
Parameters
factory
Type: System.ServiceModel.ChannelFactory<TChannel>The ChannelFactory used to create the channel.
address
Type: System.ServiceModel.EndpointAddressThe [EndpointAddress] that provides the location of the service.
Return Value
Type: TChannel
The TChannel of type [IChannel] created by the factory.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ChannelFactory<TChannel>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=office.14) or https://msdn.microsoft.com/en-us/library/bb383977(v=office.14).
See Also
Reference
SPChannelFactoryOperations Class
SPChannelFactoryOperations Members