public static Api CreateApi(int condition)
    {
        Api api = null;

        if (condition == 1)
        {
            api = new ImplA();
        }
        else
        {
            api = new ImplB();
        }
        return(api);
    }
示例#2
0
 public DependencyDispatcher(ImplA a, ImplB b)
 {
     this.a = a;
     this.b = b;
 }