public IonFilesWithCaching( IonConfig config )
        {
            _config = config;

            // Init the data client
            _dataClient = new DataClient( config );
        }
        /// <summary>
        /// Constructor with configuration file for initialization
        /// </summary>
        /// <param name="config"></param>
        public IonPagesWithCaching( IonConfig config )
        {
            _config = config;

            // Init the data client
            _dataClient = new DataClient( config );

            // Init memory cache
            _memoryCache = new MemoryCache( 16000000 );
        }
예제 #3
0
        public IonFtsImpl( IIonPages ampPages, IIonFiles ampFiles, IonConfig config )
        {
            this._ampPages = ampPages;
            this._ampFiles = ampFiles;
            this._config = config;

            // Init the data client
            _dataClient = new DataClient( config );

            _ftsQuery = new ResourceLoader( "Amp/Resources" ).GetString( "ftsQuery" );
            String dbFilePath = Path.Combine( Windows.Storage.ApplicationData.Current.LocalFolder.Path, FilePaths.GetFtsDbFilePath( _config.collectionIdentifier ) );
            _connection = new SQLiteAsyncConnection( () =>
                                                   new SQLiteConnectionWithLock( new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(),
                                                                                    new SQLiteConnectionString( dbFilePath, false,
                                                                                        openFlags: SQLite.Net.Interop.SQLiteOpenFlags.ReadOnly ) ) );
        }
 /// <summary>
 /// Updates the IonConfig file
 /// </summary>
 /// <param name="config"></param>
 public void updateConfig( IonConfig config )
 {
     _dataClient = new DataClient( config ); // TODO: check this for intense use of GC
     _config = config;
 }