Hi
I'm trying to call a C# Method from with VB.NET and am having all
sorts of troubles as I'm new to Generics. The C# method (which I
didn't develop) is as follows:
/// <summary>
/// Implementation of <c>Register(Act ion<T> handler)</c>
method of <c>ISubscriptio nService<T&g t;</c>
/// interface. Subscribes an action to be performed when a
publishing event occures.
/// Implements subscription functionality of the Publish/
Subscribe pattern.
/// The method also processes the filter custom attributes
which allows a user to define filters
/// externally.
/// </summary>
/// <param name="handler"> Represents the method that performs
an action on the specified object
/// when a publishing event occures.</param>
public virtual void Register(Action <Thandler)
{
In my VB.NET code I need to call this Register method and pass to it
the name of the Routine I want called when an event is raised. The C#
examples I've been provided are as follows:
To Register your event routine:
eventBrokerServ ice.Register(th is.OnConfEventO bjectsRead);
Declaration of the event rouine:
[MessageIdFilter (EventError.Mes sageId, ProtocolName = "ConfServer ",
SdkName = "Configuration" )]
private void OnConfEventErro r(IMessage theMessage)
{
Can someone help me convert the above statements to register an event
routine and declare an event routine to the equivalent VB.NET syntax.
I'm real stuck!
Thanks
I'm trying to call a C# Method from with VB.NET and am having all
sorts of troubles as I'm new to Generics. The C# method (which I
didn't develop) is as follows:
/// <summary>
/// Implementation of <c>Register(Act ion<T> handler)</c>
method of <c>ISubscriptio nService<T&g t;</c>
/// interface. Subscribes an action to be performed when a
publishing event occures.
/// Implements subscription functionality of the Publish/
Subscribe pattern.
/// The method also processes the filter custom attributes
which allows a user to define filters
/// externally.
/// </summary>
/// <param name="handler"> Represents the method that performs
an action on the specified object
/// when a publishing event occures.</param>
public virtual void Register(Action <Thandler)
{
In my VB.NET code I need to call this Register method and pass to it
the name of the Routine I want called when an event is raised. The C#
examples I've been provided are as follows:
To Register your event routine:
eventBrokerServ ice.Register(th is.OnConfEventO bjectsRead);
Declaration of the event rouine:
[MessageIdFilter (EventError.Mes sageId, ProtocolName = "ConfServer ",
SdkName = "Configuration" )]
private void OnConfEventErro r(IMessage theMessage)
{
Can someone help me convert the above statements to register an event
routine and declare an event routine to the equivalent VB.NET syntax.
I'm real stuck!
Thanks
Comment