예제 #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;
     }
 }
예제 #2
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;
     }
 }
예제 #3
0
 protected BaseViewModel()
 {
     Logger = new DefaultLogger();
 }