Ejemplo n.º 1
0
        public BeaconService(ISQLiteConnectionProvider sqliteConnectionProvider)
        {
            _connection = sqliteConnectionProvider.GetConnection();
            _connection.CreateTable <BeaconDataModel>();

            _beaconTransmitter = new CBPeripheralManager();
            _beaconTransmitter.StateUpdated += DidStateUpdated;

            _listOfCLBeaconRegion = new List <CLBeaconRegion>();
            _fieldRegion          = new CLBeaconRegion(new NSUuid(AppConstants.iBeaconAppUuid), "");
            _fieldRegion.NotifyEntryStateOnDisplay = true;
            _fieldRegion.NotifyOnEntry             = true;
            _fieldRegion.NotifyOnExit = true;

            // Monitoring
            _locationManager = new CLLocationManager();
            if (CLLocationManager.LocationServicesEnabled)
            {
                _locationManager.Delegate = this;
                _locationManager.PausesLocationUpdatesAutomatically = false;
                _locationManager.ShowsBackgroundLocationIndicator   = true;
                _locationManager.DistanceFilter = 1.0;
                _locationManager.AllowsBackgroundLocationUpdates = true;
                _locationManager.DidRangeBeacons      += DidRangeBeconsInRegionComplete;
                _locationManager.AuthorizationChanged += HandleAuthorizationChanged;
                _locationManager.RequestAlwaysAuthorization();
            }
        }
Ejemplo n.º 2
0
        public SQLiteRepository(ISQLiteConnectionProvider connectionProvider)
        {
            _connectionProvider = connectionProvider;
            Connection          = connectionProvider.Connection;

            // perform initial setup
            Connection.CreateTable <TModel>();
            Initialize();
        }
Ejemplo n.º 3
0
 public QuoteRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
     Connection.CreateTable <MonthlyPayment> ();
     Connection.CreateTable <TermItem> ();
     Connection.CreateTable <PurchaseOption> ();
     Connection.CreateTable <MaintenanceType> ();
     Connection.CreateTable <AdvancePayment> ();
     Connection.CreateTable <RateCardLocal> ();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Ctor
 /// Initializes a new instance of the <see cref="T:LiteX.Cache.SQLite.SQLiteCachingProvider" /> class.
 /// </summary>
 /// <param name="perRequestCacheManager">per request cacheManager</param>
 /// <param name="connectionWrapper">Connection wrapper</param>
 /// <param name="config">Config options</param>
 /// <param name="loggerFactory">Logger Factory</param>
 public SQLiteCacheManager(ICacheManager perRequestCacheManager, ISQLiteConnectionProvider connectionWrapper, SQLiteConfig config, ILiteXLoggerFactory loggerFactory = null)
 {
     if (string.IsNullOrEmpty(config.FileName))
     {
         throw new Exception("FileName is empty");
     }
     if (string.IsNullOrEmpty(config.FilePath))
     {
         throw new Exception("FilePath is empty");
     }
     _config = config;
     _perRequestCacheManager = perRequestCacheManager;
     _connectionWrapper      = connectionWrapper;
     _connection             = _connectionWrapper.GetConnection();
     _logger = (loggerFactory?.CreateLogger(this) ?? new LiteXNullLoggerFactory().CreateLogger(this));
 }
 public ObservationAttachmentRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
     Connection.CreateTable <ObservationAttachment>();
 }
 protected BaseRepository(ISQLiteConnectionProvider connectionProvider)
 {
     this.connectionProvider = connectionProvider;
 }
Ejemplo n.º 7
0
 public CustomerRepository(ISQLiteConnectionProvider sqliteConnectionProvider)
 {
     _connectionProvider = sqliteConnectionProvider;
 }
 public SiteIndicatorRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
     Connection.CreateTable <SiteIndicator>();
 }
Ejemplo n.º 9
0
 public ActivityRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
     Connection.CreateTable <ActivityModel>();
 }
Ejemplo n.º 10
0
 public BatFamilyService(ISQLiteConnectionProvider liteconectionProvider)
 {
     this.LiteconectionProvider = liteconectionProvider;
     this.LiteConnection        = this.LiteconectionProvider.GetConnection();
     this.LiteConnection.CreateTableAsync <BatFamily>();
 }
Ejemplo n.º 11
0
 public BeaconService(HttpDataService httpDataService, ISQLiteConnectionProvider sqliteConnectionProvider)
 {
     _httpDataService = httpDataService;
     _connection      = sqliteConnectionProvider.GetConnection();
     _connection.CreateTable <BeaconDataModel>();
 }
 public IndicatorAgeRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
     Connection.CreateTable <IndicatorAgePeriod>();
 }
Ejemplo n.º 13
0
 public ProfileInfoRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
 }
 public SQLiteConnectionFactory(ISQLiteConnectionProvider sqliteConnectionProvider)
 {
     this.sqliteConnectionProvider = sqliteConnectionProvider;
 }
 public ObservationEntryRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
 }
Ejemplo n.º 16
0
 public BanRepository(ISQLiteConnectionProvider sqliteConnectionProvider)
 {
     _connectionProvider = sqliteConnectionProvider;
 }
 public ObservationChangeRepository(ISQLiteConnectionProvider provider) : base(provider)
 {
     Connection.CreateTable <ObservationChange>();
 }
Ejemplo n.º 18
0
 public SQLiteDataAccess(ISQLiteConnectionProvider ConnectionProvider)
 {
     this.ConnectionProvider = ConnectionProvider;
     this.Connection         = this.ConnectionProvider.GetConnection();
     this.Connection.CreateTable <Employe>();
 }
Ejemplo n.º 19
0
 public HomeViewModel(IGALogger logger, ISQLiteConnectionProvider provider, ILocalNotificationService localNotificationService)
 {
     _connection = provider.Connection;
     _localNotificationService = localNotificationService;
 }
Ejemplo n.º 20
0
 public BatFamilyService(ISQLiteConnectionProvider connectionProvider)
 {
     ConnectionProvider = connectionProvider;
     Connection         = ConnectionProvider.GetConnection();
     Connection.CreateTableAsync <BatFamily>();
 }