events that fire events that fire events....a bad thing?
- From: "Daniel" <nospam@xxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 00:10:12 -0000
Hi,
I have a scenario where a class is wrapped inside another but the inner
class triggers an event. I want that event to be accessed outside of the
wrapper. As a result i do code such as:
public Table()
{
_Logic = LogicFactory.Instance.GetLogic();
_Logic.MoveDone += OnMoveDone;
}
public void OnMoveDone(int tableId, int? playerId, bool bBroadCast)
//fired by event in _Logic class
{
MoveDone (tableId, playerId, bBroadCast); //trigger event for
this wrapper class
}
So my query is, the above way of doing this is ok? Or is there some way i
canmake the MoveDone event in _Logic available to an external class directly
without the need for a seemingly redundant inner method. Something like:
public event MoveDoneEvent
{
get { return _Logic.MoveDone; }
}
Thanks
.
- Follow-Ups:
- Re: events that fire events that fire events....a bad thing?
- From: Bruce Wood
- Re: events that fire events that fire events....a bad thing?
- Prev by Date: Creating a process owned by system not user
- Next by Date: ConfigurationErrorsExecption was unhandled.
- Previous by thread: Creating a process owned by system not user
- Next by thread: Re: events that fire events that fire events....a bad thing?
- Index(es):