Kind of Macro in C#

  • Thread starter Thread starter Tamir Khason
  • Start date Start date
T

Tamir Khason

Interesting question:
I want to build kindof macro structure form inside the class by
1) "Recording" methods called with it's parameters used from inside and
timestamps
2) "Play" the flow recorded.

E.G.
//Class
class foo()
{
public DoSomething(string st)
{Console.Write(st);}
}
//Caller
this.onKeyDown+=.....
void onKeyDown
(foo.DoSomething(DateTime.Now()+" - "+e.Keyvalue);

//User's Output
Dump:
00:00 a
00:01 b
00:02 c
00:10 g
01:01 r

//Now playing macro:
I want to see the same dump, based on timestamps

Please advice..
 
Hi

It is not very clear what you want, but take a look at the Command
pattern.It lets you repeat a set of request.

Cheers,
 
Back
Top