singrdk/base/Applications/Network/TcpBlast/WellKnownSequences.cs

22 lines
551 B
C#
Raw Normal View History

2008-11-17 18:29:00 -05:00
public class WellKnownSequences
{
public static IInt32SequenceFactory GetWellKnownSequence(string/*!*/ name)
{
name = name.ToLower();
switch (name) {
case "fib":
return delegate { return (IInt32Sequence)new FibonacciSequence(); };
case "add":
return delegate { return (IInt32Sequence)new AscendingSequence(0, 1); };
default:
return null;
}
}
}
public delegate IInt32Sequence/*!*/ IInt32SequenceFactory();