[EventPublisher("Brokerage.TradingSystem.Trade.ReceivedFromBackend")]
public void OnTradeReceived(Trade trade)
{
.......
EventManager.Fire(this, "Brokerage.TradingSystem.Trade.ReceivedFromBackend",
tradeArgs);
}
Here is the code:
using System;
// --------------------------------------------------------------------
//
// This code is (C) Copyright 2005 Marc Adler
//
// --------------------------------------------------------------------
namespace Magmasystems.EventManager
{
///
/// EventPublisherAttribute
///
public class EventPublisherAttribute : Attribute
{
private string _topicName;
public EventPublisherAttribute()
{
}
///
/// EventPublisherAttribute
///
/// The name of the event
public EventPublisherAttribute(string topicName)
{
this._topicName = topicName;
}
public string Topic
{
get
{
return this._topicName;
}
set
{
this._topicName = value;
}
}
}
}
©2006 Marc Adler - All Rights Reserved
No comments:
Post a Comment