Ejemplo n.º 1
0
 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;
     }
 }