public static ClientProvider GetInstance(string host, int port) { if (instance == null) { instance = new ClientProvider(host, port); try { instance.Setup(); } catch (Exception ex) { instance.Close(); instance = null; throw ex; } } return instance; }
public static ClientProvider GetInstance(string host, int port) { if (instance == null) { instance = new ClientProvider(host, port); try { instance.Setup(); } catch (Exception ex) { instance.Close(); instance = null; throw ex; } } return(instance); }