Exemplo n.º 1
0
 /// <summary> Sqlite 3 profile. </summary>
 /// <exception cref="ArgumentNullException"> Thrown when one or more required arguments are null. </exception>
 /// <exception cref="ArgumentException"> Thrown when one or more arguments have unsupported or
 ///     illegal values. </exception>
 /// <param name="db"> The database. </param>
 /// <param name="func"> The function. </param>
 /// <param name="value"> The value. </param>
 /// <param name="isMaintenanceDb"> (Optional) True if this object is maintenance database. </param>
 internal void sqlite3_profile(SqliteDatabaseHandle db, DbProvider.delegate_profile func, object value, bool isMaintenanceDb = false)
 {
     if (db == null)
     {
         throw new ArgumentNullException(nameof(db));
     }
     DbProvider.sqlite3 database = (isMaintenanceDb ? db.MaintenanceDb : db.Db)
                                   ?? throw new ArgumentException((isMaintenanceDb
                                           ? "Maintenance mode is specified, but the database is not in Maintenance Mode."
                                           : "The database is in Maintenance Mode, but this was not properly specified."),
                                                                  nameof(isMaintenanceDb));
     DbProviderOperations.sqlite3_profile(database, func, value);
 }