Esempio n. 1
0
 static void Main(string[] args)
 {
     try
     {
         CContextFactory factory = new CContextFactory();
         factory.Register <CDbContext>();
         CFaStorageService faStorageService = new CFaStorageService(factory);
         using (ServiceHost host = new ServiceHost(faStorageService))
         {
             host.Open();
             Console.WriteLine($"{nameof(CFaStorageService)} service is started...");
             Console.ReadLine();
             host.Close();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine($"An exception occurred: {ex.Message}");
         s_logger.Error(ex);
         Console.ReadLine();
     }
 }
Esempio n. 2
0
 public CFaStorageService(CContextFactory contextFactory)
 {
     _contextFactory      = contextFactory;
     _notificationService = new NotificationServiceClient();
     _exportService       = new ExportServiceClient();
 }