This documentation is archived and is not being maintained.
IChannelReceiverHook Interface
Visual Studio 2010
Indicates that the implementing channel wants to hook into the outside listener service.
Assembly: mscorlib (in mscorlib.dll)
The IChannelReceiverHook type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ChannelScheme | Gets the type of listener to hook into. |
![]() | ChannelSinkChain | Gets the channel sink chain that the current channel is using. |
![]() | WantsToListen | Gets a Boolean value that indicates whether IChannelReceiverHook needs to be hooked into the outside listener service. |
// Implementation of 'IChannelReceiverHook' interface. public ref class MyCustomChannel: public IChannelReceiverHook { private: bool portSet; public: // Constructor for MyCustomChannel. MyCustomChannel( int /*port*/ ) { MyChannelScheme = "http"; portSet = true; } // Constructor for MyCustomChannel. MyCustomChannel() { MyChannelScheme = "http"; portSet = false; } property bool WantsToListen { [System::Security::Permissions::SecurityPermissionAttribute (System::Security::Permissions::SecurityAction::LinkDemand, Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)] virtual bool get() { if ( portSet ) { return false; } else { return true; } } } private: String^ MyChannelScheme; public: property String^ ChannelScheme { [System::Security::Permissions::SecurityPermissionAttribute (System::Security::Permissions::SecurityAction::LinkDemand, Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)] virtual String^ get() { return MyChannelScheme; } } property IServerChannelSink^ ChannelSinkChain { [System::Security::Permissions::SecurityPermissionAttribute (System::Security::Permissions::SecurityAction::LinkDemand, Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)] virtual IServerChannelSink^ get() { // Null implementation. return nullptr; } } [System::Security::Permissions::SecurityPermissionAttribute (System::Security::Permissions::SecurityAction::LinkDemand, Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)] virtual void AddHookChannelUri( String^ /*channelUri*/ ) { // Null implementation. } };
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
