public static IDatabaseIODevice UseStoneVault
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     [NotNull] Stream stream,
     bool leaveStreamOpen = false
 )
 => new StoneVaultIODevice(stream, leaveStreamOpen);
Beispiel #2
0
 public static IDatabaseIODevice UseStringDB
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     StringDBVersion version,
     [NotNull] string file
 )
 => builder.UseStringDB(version, file, NoByteBuffer.Read);
Beispiel #3
0
 public static IDatabaseIODevice UseStringDB
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     StringDBVersion version,
     [NotNull] Stream stream,
     bool leaveStreamOpen = false
 )
 => builder.UseStringDB(version, stream, NoByteBuffer.Read, leaveStreamOpen);
 public static IDatabaseIODevice UseStringDB
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     StringDBVersions version,
     [NotNull] Stream stream,
     bool leaveStreamOpen = false
 )
 => new DatabaseIODevice
 (
     version.UseVersion(stream, leaveStreamOpen)
 );
Beispiel #5
0
 public static IDatabaseIODevice UseStringDB
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     StringDBVersion version,
     [NotNull] Stream stream,
     [NotNull] Func <BinaryReader, int, byte[]> buffer,
     bool leaveStreamOpen = false
 )
 => new DatabaseIODevice
 (
     version.UseVersion(stream, buffer, leaveStreamOpen)
 );
 public static IDatabaseIODevice UseStringDB
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     StringDBVersions version,
     [NotNull] string file
 )
 => builder
 .UseStringDB
 (
     version,
     File.Open
     (
         file,
         FileMode.OpenOrCreate,
         FileAccess.ReadWrite
     )
 );
Beispiel #7
0
 public static IDatabaseIODevice UseStringDB
 (
     [CanBeNull] this DatabaseIODeviceBuilder builder,
     StringDBVersion version,
     [NotNull] string file,
     [NotNull] Func <BinaryReader, int, byte[]> buffer,
     bool leaveStreamOpen = false
 )
 => builder
 .UseStringDB
 (
     version,
     File.Open
     (
         file,
         FileMode.OpenOrCreate,
         FileAccess.ReadWrite
     ),
     buffer,
     leaveStreamOpen: leaveStreamOpen
 );