public static IHelloWorld CreateInstance(HelloWorldClient client, string connectionString) { HelloWorldRepository repository = new HelloWorldRepository(connectionString); switch (client) { case HelloWorldClient.CONSOLE: return(new HelloWorldConsole(repository)); case HelloWorldClient.WEB: return(new HelloWorldWeb(repository)); case HelloWorldClient.MOBILE: return(new HelloWorldMobile(repository)); case HelloWorldClient.WIN_SERVICE: return(new HelloWorldWinService(repository)); default: throw new NotImplementedException(string.Format("Unknown Client : {0} ", client)); } }
public HelloWorldWeb(HelloWorldRepository repository) : base(repository, HelloWorldClient.WEB) { }
public HelloWorldConsole(HelloWorldRepository repository) : base(repository, HelloWorldClient.CONSOLE) { }
public HelloWorldBase(HelloWorldRepository repository, HelloWorldClient client) { this.client = client; this.repository = repository; }
public HelloWorldMobile(HelloWorldRepository repository) : base(repository, HelloWorldClient.MOBILE) { }
public HelloWorldWinService(HelloWorldRepository repository) : base(repository, HelloWorldClient.WIN_SERVICE) { }