diff --git a/TYLDDB/Basic/Exception.cs b/TYLDDB/Basic/Exception.cs index c354060..0d7924d 100644 --- a/TYLDDB/Basic/Exception.cs +++ b/TYLDDB/Basic/Exception.cs @@ -14,6 +14,7 @@ public class TylddbException : Exception /// public TylddbException(string message) : base(message) { } } + /// /// File opening failure
/// 文件打开失败 @@ -26,6 +27,7 @@ public class FileOpenFailException : TylddbException ///
public FileOpenFailException(string message) : base(message) { } } + /// /// File read failure
/// 文件读取失败 @@ -38,6 +40,7 @@ public class FileReadingFailException : TylddbException ///
public FileReadingFailException(string message) : base(message) { } } + /// /// File not found
/// 文件未找到 @@ -50,6 +53,7 @@ public class FileNotFoundException : TylddbException ///
public FileNotFoundException(string message) : base(message) { } } + /// /// The file path is null or space
/// 文件路径为null或空白 @@ -62,6 +66,7 @@ public class FilePathIsNullOrWhiteSpace : TylddbException ///
public FilePathIsNullOrWhiteSpace(string message) : base(message) { } } + /// /// Incorrect or invalid data
/// 错误或无效的数据 @@ -74,6 +79,7 @@ public class InvalidDataException : TylddbException ///
public InvalidDataException(string message) : base(message) { } } + /// /// Database not found
/// 未找到数据库 @@ -86,6 +92,7 @@ public class DatabaseNotFoundException : TylddbException ///
public DatabaseNotFoundException(string message) : base(message) { } } + /// /// Description Failed to obtain the database content
/// 数据库内容获取失败 diff --git a/TYLDDB/TYLDDB.cs b/TYLDDB/TYLDDB.cs index cdc8d6a..5370b06 100644 --- a/TYLDDB/TYLDDB.cs +++ b/TYLDDB/TYLDDB.cs @@ -20,7 +20,29 @@ public class LDDB ///
public LDDB() { - // NOTHING HERE! + database = new Database(); // 实例化数据库操作类 + + // 实例化并发词典 + cdStringDictionary = new CdStringDictionary(); + cdShortDictionary = new CdShortDictionary(); + cdLongDictionary = new CdLongDictionary(); + cdIntegerDictionary = new CdIntegerDictionary(); + cdFloatDictionary = new CdFloatDictionary(); + cdDoubleDictionary = new CdDoubleDictionary(); + cdDecimalDictionary = new CdDecimalDictionary(); + cdCharDictionary = new CdCharDictionary(); + cdBooleanDictionary = new CdBooleanDictionary(); + + // 实例化信号词典 + stlStringDictionary = new StlStringDictionary(); + stlShortDictionary = new StlShortDictionary(); + stlLongDictionary = new StlLongDictionary(); + stlIntegerDictionary = new StlIntegerDictionary(); + stlFloatDictionary = new StlFloatDictionary(); + stlDoubleDictionary = new StlDoubleDictionary(); + stlDecimalDictionary = new StlDecimalDictionary(); + stlCharDictionary = new StlCharDictionary(); + stlBooleanDictionary = new StlBooleanDictionary(); } ///////////////////////////////////////////////////// 私有字段 @@ -29,9 +51,25 @@ public LDDB() private string _database; // 存储正在访问的数据库 private string _databaseContent; // 存储数据库内容 private bool _isRead = false; // 是否已调用读取文件 - private Database database = new Database(); - private CdStringDictionary cdStringDictionary = new CdStringDictionary(); - private StlStringDictionary StlStringDictionary = new StlStringDictionary(); + private Database database; + private CdStringDictionary cdStringDictionary; + private CdShortDictionary cdShortDictionary; + private CdLongDictionary cdLongDictionary; + private CdIntegerDictionary cdIntegerDictionary; + private CdFloatDictionary cdFloatDictionary; + private CdDoubleDictionary cdDoubleDictionary; + private CdDecimalDictionary cdDecimalDictionary; + private CdCharDictionary cdCharDictionary; + private CdBooleanDictionary cdBooleanDictionary; + private StlStringDictionary stlStringDictionary; + private StlShortDictionary stlShortDictionary; + private StlLongDictionary stlLongDictionary; + private StlIntegerDictionary stlIntegerDictionary; + private StlFloatDictionary stlFloatDictionary; + private StlDoubleDictionary stlDoubleDictionary; + private StlDecimalDictionary stlDecimalDictionary; + private StlCharDictionary stlCharDictionary; + private StlBooleanDictionary stlBooleanDictionary; ///////////////////////////////////////////////////// 公开字段 /// diff --git a/TYLDDB/TYLDDB.csproj b/TYLDDB/TYLDDB.csproj index b470d6c..3c0d91e 100644 --- a/TYLDDB/TYLDDB.csproj +++ b/TYLDDB/TYLDDB.csproj @@ -4,7 +4,7 @@ netstandard2.1;net6.0;net8.0;net9.0 True TYLDDB.NET - 1.0.0-alpha.4 + 1.0.0-alpha.3p TYLDDB-Project LICENSE True diff --git a/TimeRecord/TimeRecord.csproj b/TimeRecord/TimeRecord.csproj index 58f574d..65845ec 100644 --- a/TimeRecord/TimeRecord.csproj +++ b/TimeRecord/TimeRecord.csproj @@ -5,13 +5,5 @@ enable enable - -<<<<<<<< HEAD:TimeRecord/TimeRecord.csproj -======== - - - - - ->>>>>>>> cdf9c1039cfeae32fce9aac87ceb4ce2409ec22d:TYLDDB.Utils.FastCache.Test/TYLDDB.Utils.FastCache.Test.csproj +