Пример #1
0
 private void InitializeDatabase()
 {
     EnsureDatabaseDirectoryExists();
     try
     {
         _storageAdapter.Initialize(_databasePath);
         _storageAdapter.CreateTable(TableName,
                                     new[] { ColumnIdName, ColumnChannelName, ColumnLogName },
                                     new[] { "INTEGER PRIMARY KEY AUTOINCREMENT", "TEXT NOT NULL", "TEXT NOT NULL" });
     }
     catch (Exception e)
     {
         AppCenterLog.Error(AppCenterLog.LogTag, "An error occurred while initializing storage", e);
     }
 }