if (data
{
dataStream
data = DbEntry
}
continue;
case ReadStatus
dataStream
dataStream
cust = (IPut)formatter
return true;
default:
return false;
}
} while (true);
}
六
{
string Key { get; }
}
public class BDBManager : IDisposable
{
/// <summary>
/// 數據庫目錄
/// </summary>
private string directory;
/// <summary>
/// 數據庫文件名
/// </summary>
private string dbName;
private DbBTree btree;
private Txn txn;
private Db db;
private Env env;
/// <summary>
/// 二進制序列化
/// </summary>
private BinaryFormatter formatter;
/// <summary>
/// 鍵內存流
/// </summary>
private MemoryStream keyStream;
/// <summary>
/// 內容內存流
/// </summary>
private MemoryStream dataStream;
public BDBManager(string directory
{
this
this
Init();
StreamInit();
}
public bool Set(IPut put)
{
Reset();
[
From:http://tw.wingwit.com/Article/program/net/201311/14800.html