Esempio n. 1
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     StringDBVersion version,
     [NotNull] string file
 )
 => builder.UseIODatabase(version, file, out _);
Esempio n. 2
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     this DatabaseBuilder builder,
     IODatabaseOptions options,
     [NotNull] out IOptimalTokenSource optimalTokenSource
 )
 => builder.UseIODatabase(ioDeviceBuilder =>
Esempio n. 3
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     [NotNull] Func <DatabaseIODeviceBuilder, IDatabaseIODevice> databaseIODevice,
     [NotNull] out IOptimalTokenSource optimalTokenSource
 )
 => builder.UseIODatabase(databaseIODevice(new DatabaseIODeviceBuilder()), out optimalTokenSource);
Esempio n. 4
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     StringDBVersions version,
     [NotNull] string file
 )
 => builder.UseIODatabase(databaseIODeviceBuilder => databaseIODeviceBuilder.UseStringDB(version, file));
Esempio n. 5
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     StringDBVersion version,
     [NotNull] string file,
     [NotNull] out IOptimalTokenSource optimalTokenSource
 )
 => builder.UseIODatabase(databaseIODeviceBuilder => databaseIODeviceBuilder.UseStringDB(version, file), out optimalTokenSource);
Esempio n. 6
0
        public static IDatabase <byte[], byte[]> UseIODatabase
        (
            [CanBeNull] this DatabaseBuilder builder,
            [NotNull] IDatabaseIODevice databaseIODevice,
            [NotNull] out IOptimalTokenSource optimalTokenSource
        )
        {
            var iodb = new IODatabase(databaseIODevice);

            optimalTokenSource = iodb.DatabaseIODevice.OptimalTokenSource;
            return(iodb);
        }
Esempio n. 7
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     [NotNull] Func <DatabaseIODeviceBuilder, IDatabaseIODevice> databaseIODevice
 )
 => builder.UseIODatabase(databaseIODevice, out _);
Esempio n. 8
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     [NotNull] IDatabaseIODevice databaseIODevice
 )
 => new IODatabase(databaseIODevice);
Esempio n. 9
0
 public static IDatabase <TKey, TValue> UseMemoryDatabase <TKey, TValue>
 (
     [CanBeNull] this DatabaseBuilder builder,
     [NotNull] List <KeyValuePair <TKey, TValue> > data
 )
 => new MemoryDatabase <TKey, TValue>(data);
Esempio n. 10
0
 public static IDatabase <TKey, TValue> UseMemoryDatabase <TKey, TValue>
 (
     [CanBeNull] this DatabaseBuilder builder
 )
 => builder.UseMemoryDatabase <TKey, TValue>(null);