public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     StringDBVersion version,
     [NotNull] string file
 )
 => builder.UseIODatabase(version, file, out _);
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     this DatabaseBuilder builder,
     IODatabaseOptions options,
     [NotNull] out IOptimalTokenSource optimalTokenSource
 )
 => builder.UseIODatabase(ioDeviceBuilder =>
 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);
Exemple #4
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     StringDBVersions version,
     [NotNull] string file
 )
 => builder.UseIODatabase(databaseIODeviceBuilder => databaseIODeviceBuilder.UseStringDB(version, file));
 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);
        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);
        }
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     [NotNull] Func <DatabaseIODeviceBuilder, IDatabaseIODevice> databaseIODevice
 )
 => builder.UseIODatabase(databaseIODevice, out _);
Exemple #8
0
 public static IDatabase <byte[], byte[]> UseIODatabase
 (
     [CanBeNull] this DatabaseBuilder builder,
     [NotNull] IDatabaseIODevice databaseIODevice
 )
 => new IODatabase(databaseIODevice);
Exemple #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);
Exemple #10
0
 public static IDatabase <TKey, TValue> UseMemoryDatabase <TKey, TValue>
 (
     [CanBeNull] this DatabaseBuilder builder
 )
 => builder.UseMemoryDatabase <TKey, TValue>(null);