public static void Start() { try { Logger = new DefaultLogger(); var factory = new ChannelFactory<IDocumentsRepository>(ServiceFactory.Binding, new EndpointAddress(ServiceFactory.Uri)); Proxy = factory.CreateChannel(); Proxy.Ping(); } catch (Exception) { Logger.LogError("Service is not available"); Proxy = null; } }