/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public override IBin Open(BinConfiguration config) { IBin bin = base.Open(config); ((IBlockSize)Environments.My(typeof(IBlockSize))).Register((IListener4)bin); return(bin); }
protected override IBin ProduceBin(BinConfiguration config, int pageSize) { IBin bin = base.ProduceBin(config, pageSize); bin.Write(0, PagingMemoryStorageTestCase.Data, PagingMemoryStorageTestCase.Data.Length ); return(bin); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { MsgExceptionHandlingTestCase.CloseAwareBin decorated = new MsgExceptionHandlingTestCase.CloseAwareBin (this, bin); lock (_openBins) { _openBins[decorated] = decorated; } return(decorated); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { var decorated = new CloseAwareBin (this, bin); lock (_openBins) { _openBins[decorated] = decorated; } return(decorated); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { try { var file = new FileStream(_fileName, FileMode.Create); var @out = new StreamWriter(file); return(new LoggingBin(bin, @out, _config)); } catch (FileNotFoundException e) { throw new Db4oIOException(e); } }
public virtual void Test() { MockBin mock = new MockBin(); BinConfiguration binConfig = new BinConfiguration("uri", true, 42L, false); IBin storage = new NonFlushingStorage(new _IStorage_19(mock)).Open(binConfig); byte[] buffer = new byte[5]; storage.Read(1, buffer, 4); storage.Write(2, buffer, 3); mock.ReturnValueForNextCall(42); Assert.AreEqual(42, mock.Length()); storage.Sync(); storage.Close(); mock.Verify(new MethodCall[] { new MethodCall("open", new object[] { binConfig }) , new MethodCall("read", new object[] { 1L, buffer, 4 }), new MethodCall("write" , new object[] { 2L, buffer, 3 }), new MethodCall("length", new object[] { }), new MethodCall("close", new object[] { }) }); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new DelayingStorage.DelayingBin(bin, _delays)); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public IBin Open(BinConfiguration config) { mock.Record(new MethodCall("open", new object[] { config })); return(mock); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new DefragEncryptedFileTestCase.MockStorage.MockBin(bin, password)); }
protected virtual IBin Decorate(BinConfiguration config, IBin bin) { return bin; }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new MyNotificationBin(bin)); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new CrashSimulatingBin(bin, _batch, _fileName)); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { ResetShutdownState(); return(new ExceptionSimulatingStorage.ExceptionSimulatingBin(bin, _exceptionFactory , _triggerCondition)); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new MockBin(bin, password)); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new LoggingBin(base.Decorate(config, bin))); }
public override IBin Open(BinConfiguration config) { Console.WriteLine("Called: LoggingStorage.Open(" + config + ")"); return(base.Open(config)); }
protected virtual IBin Decorate(BinConfiguration config, IBin bin) { return(bin); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual IBin Open(BinConfiguration config) { return(Decorate(config, _storage.Open(config))); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new MonitoredBin(bin)); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new BlockSizeDependentBinTestCase.BlockSizeDependentStorage.BlockSizeDependentBin (bin, _blockSize)); }
protected override IBin Decorate(BinConfiguration config, IBin bin) { return(new _BinDecorator_44(this, bin)); }
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception> public virtual IBin Open(BinConfiguration config) { return Decorate(config, _storage.Open(config)); }