public static Api CreateApi(int condition) { Api api = null; if (condition == 1) { api = new ImplA(); } else { api = new ImplB(); } return(api); }
public DependencyDispatcher(ImplA a, ImplB b) { this.a = a; this.b = b; }