CSharpTest.Net
IpcEventChannel Constructor(String,String)
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.IpcChannel Namespace > IpcEventChannel Class > IpcEventChannel Constructor : IpcEventChannel Constructor(String,String)

hkcuKeyPath
The registry current-user path to all channels ex: @"Software\MyProduct\IpcChannels"
channelName
The name of the channel to subscribe or send events to

Glossary Item Box

Creates an IpcEventChannel that persists state in Registry.LocalMachine at hklmKeyPath + channelName

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal hkcuKeyPath As String, _
   ByVal channelName As String _
)
C# 
public IpcEventChannel( 
   string hkcuKeyPath,
   string channelName
)

Parameters

hkcuKeyPath
The registry current-user path to all channels ex: @"Software\MyProduct\IpcChannels"
channelName
The name of the channel to subscribe or send events to

Example

Library/Library.Test/TestIpcChannel.cs

C#Copy Code
using (IpcEventChannel ch1 = new IpcEventChannel(@"CSharpTest.Net\IpcChannelTest", _channel))
using (IpcEventChannel ch2 = new IpcEventChannel(@"CSharpTest.Net\IpcChannelTest", _channel))
{
    Assert.AreNotEqual(ch1.InstanceId, ch2.InstanceId);
}
VB.NETCopy Code
Using ch1 As New IpcEventChannel("CSharpTest.Net\IpcChannelTest", _channel)
    Using ch2 As New IpcEventChannel("CSharpTest.Net\IpcChannelTest", _channel)
        Assert.AreNotEqual(ch1.InstanceId, ch2.InstanceId)
    End Using
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys