Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class QDMTestFactory
- {
- private static Func<TaborArb2074, QDMTest> FactoryMethod { get; set; }
- public static void Initalize(Func<TaborArb2074, QDMTest> factoryMethod)
- {
- FactoryMethod = factoryMethod;
- }
- public static QDMTest Create(TaborArb2074 taborArb)
- {
- if (FactoryMethod != null)
- return FactoryMethod(taborArb);
- return new QDMTest(taborArb);
- }
- }
- public static class TaborArb2074Factory
- {
- private static Func<string, TaborArb2074> FactoryMethod { get; set; }
- public static void Initialize(Func<string, TaborArb2074> factoryMethod)
- {
- FactoryMethod = factoryMethod;
- }
- public static TaborArb2074 Create(string address)
- {
- if (FactoryMethod != null)
- return FactoryMethod(address);
- return new TaborArb2074(address);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement