Ejemplo n.º 1
0
 public static DataBaseService GetInstance()
 {
     lock (monitor)
     {
         if (instance == null)
         {
             instance = new DataBaseService();
         }
     }
     return(instance);
 }
 public static DataBaseService GetInstance()
 {
     lock (monitor)
     {
         if (instance == null)
         {
             instance = new DataBaseService();
         }
     }
     return instance;
 }
Ejemplo n.º 3
0
        public StorageService()
        {
            MsgDispatcher = MessageDispatcher.GetInstance();
            logger = LogService.GetLogger();

            DBService = DataBaseService.GetInstance();
            Status = StatusService.GetInstance();

            logger.Debug("Storage service initiated");
            logger.Debug("Starting history update");
            Task.Factory.StartNew(async () => await UpdateHistory());
            purchaseHistory = new ListSafe<Purchase>();
        }