Hi,
I am not much clear about your intension by "persistent events and scheduling" but the event mechanizm in Microsoft.Net is very good. I have given you sample which shows how to create it and how to use it.
This is a Sample according to publisher-subscriber scenario in Observer design pattern which will give you the idea of creating and using the custom delegate - which is the same concept .Net for Function pointer
On publisher side:
Delegate:
public void delegate MyDelegate(MyType sender, MyParamCollection params);
Event in MyType:
public event MyDelegate MyEvent;
Define some method for raising event like,
private void OnMyEvent() {
MyParamCollection coll = new MyParamCollection();
:
:
if(MyEvent !=null) {
MyEvent(this, coll);
}
}
and call this method at some point where you want to raise the specific event,
On subscriber side:
objMyType.MyEvent += new MyDelegate(MyEventHandlerMethod);
private void MyEventHandlerMethod(MyType sender, MyParamCollection params) {
do something.....
}
If MyType is the class from where you want to raise the event then you can call OnMyEvent method from some point like user input, or at some condition satisfiying point etc in your business object [here MyType is that class] and that way you can achieve the effect you want.
HTH,
<ve****@yahoo.com> wrote in message news:11*********************@g47g2000cwa.googlegro ups.com...
Dear colleagues, we have encountered some problems.
there are some types of events in our system: business objects events,
events that fire on time, on some conditions, and on user input.
so we need some framework or library which includes persistent events
and scheduling
any ideas are welcome.
thanks in advance.