本文整理汇总了C#中IBin类的典型用法代码示例。如果您正苦于以下问题:C# IBin类的具体用法?C# IBin怎么用?C# IBin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IBin类属于命名空间,在下文中一共展示了IBin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Decorate
protected override IBin Decorate(BinConfiguration config, IBin bin)
{
MsgExceptionHandlingTestCase.CloseAwareBin decorated = new MsgExceptionHandlingTestCase.CloseAwareBin
(this, bin);
lock (_openBins)
{
_openBins[decorated] = decorated;
}
return decorated;
}
示例2: LogReplayer
public LogReplayer(String logFilePath, IBin bin, ISet commands)
{
_logFilePath = logFilePath;
_bin = bin;
_commands = commands;
_counts = new Hashtable();
foreach (object com in commands)
{
_counts[com] = (Int64)0;
}
}
示例3: CachingBin
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
public CachingBin(IBin bin, ICache4 cache, int pageCount, int pageSize) : base(bin
)
{
_onDiscardPage = new _IProcedure4_22(this);
_producerFromDisk = new _IFunction4_138(this);
_producerFromPool = new _IFunction4_147(this);
_pageSize = pageSize;
_pagePool = new SimpleObjectPool(NewPagePool(pageCount));
_cache = cache;
_fileLength = _bin.Length();
}
示例4: Decorate
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);
}
}
示例5: Decorate
protected override IBin Decorate(BinConfiguration config, IBin bin)
{
ResetShutdownState();
return new ExceptionSimulatingStorage.ExceptionSimulatingBin(bin, _exceptionFactory
, _triggerCondition);
}
示例6: DelegateTo
public virtual void DelegateTo(IBin bin)
{
_bin = bin;
}
示例7: SyncAndClose
private static void SyncAndClose(IBin bin)
{
if (bin != null)
{
try
{
bin.Sync();
}
finally
{
bin.Close();
}
}
}
示例8: Decorate
protected override IBin Decorate(BinConfiguration config, IBin bin)
{
return new MonitoredBin(bin);
}
示例9: AssertReadOnly
private void AssertReadOnly(IBin adapter)
{
Assert.Expect(typeof(Db4oIOException), new _ICodeBlock_21(adapter));
}
示例10: ThreadedSyncBin
public ThreadedSyncBin(IBin bin) : base(bin)
{
_thread = new Thread(new _IRunnable_23(this), "ThreadedSyncBin");
_thread.Start();
}
示例11: NonFlushingCachingBin
/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
public NonFlushingCachingBin(IBin bin, ICache4 cache, int pageCount, int pageSize
) : base(bin, cache, pageCount, pageSize)
{
}
示例12: Decorate
protected override IBin Decorate(BinConfiguration config, IBin bin)
{
var decorated = new CloseAwareBin
(this, bin);
lock (_openBins)
{
_openBins[decorated] = decorated;
}
return decorated;
}
示例13: CloseAwareBin
public CloseAwareBin(CloseAwareStorage storage, IBin
bin) : base(bin)
{
_storage = storage;
}
示例14: Decorate
protected virtual IBin Decorate(BinConfiguration config, IBin bin)
{
return bin;
}
示例15: BlockAwareBin
public BlockAwareBin(IBin bin) : base(bin)
{
}