Ejemplo n.º 1
0
        public SQLiteCacheData(IsolatedStorageSchema schema, IsolatedStorageOfflineContext context)
        {
//            Collections = new Dictionary<EntityType, IsolatedStorageCollection>();
            SyncConflicts = new List <SyncConflict>();
            SyncErrors    = new List <SyncError>();

            CreateCollections(schema, context);
        }
Ejemplo n.º 2
0
        private void CreateCollections(IsolatedStorageSchema schema, IsolatedStorageOfflineContext context)
        {
//            Type collectionType = typeof(IsolatedStorageCollection<>);
//            foreach (EntityType t in schema.Collections)
//            {
//                // CreateInstance the generic type for the type in the collection.
//                Type generic = collectionType.MakeGenericType(t);
//                IsolatedStorageCollection collection = (IsolatedStorageCollection)Activator.CreateInstance(generic, context);
//                Collections[t] = collection;
//            }
        }
Ejemplo n.º 3
0
        public SQLiteStorageHandler(IOfflineContext ctx, IsolatedStorageSchema schema, string cachePath, SymmetricAlgorithm encryptionAlgorithm)
        {
            _context             = ctx;
            _schema              = schema;
            _cachePath           = cachePath;
            _encryptionAlgorithm = encryptionAlgorithm;
            _anchor              = null;

            _knownTypes = new List <IEntityType>();

            AddKnownTypes();
        }
Ejemplo n.º 4
0
        public SQLiteStorageHandler(IsolatedStorageOfflineContext ctx, IsolatedStorageSchema schema, string cachePath, SymmetricAlgorithm encryptionAlgorithm)
        {
            _context             = ctx;
            _schema              = schema;
            _cachePath           = cachePath;
            _encryptionAlgorithm = encryptionAlgorithm;
            _anchor              = null;

            _knownTypes = new List <EntityType>
            {
//                new EntityType(typeof (SyncConflict)),
//                new EntityType(typeof (SyncError))
            };

            AddKnownTypes();
        }