/// <summary> /// Creates a new <see cref="IOLoader"/>. /// </summary> /// <param name="dbIODevice">The database IO device to read the value from.</param> /// <param name="position">The position the value is stored at.</param> public IOLoader ( [NotNull] IDatabaseIODevice dbIODevice, long position ) { _dbIODevice = dbIODevice; _position = position; }
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); }
/// <summary> /// Create an IODatabase with the IDatabaseIODevice specified. /// </summary> /// <param name="dbIODevice">The DatabaseIODevice to use under the hood.</param> /// <param name="comparer">The equality comparer to use for the key.</param> public IODatabase([NotNull] IDatabaseIODevice dbIODevice, [NotNull] IEqualityComparer <byte[]> comparer) : base(keyComparer: comparer) => DatabaseIODevice = dbIODevice;
/// <summary> /// Create an IODatabase with the IDatabaseIODevice specified. /// </summary> /// <param name="dbIODevice">The DatabaseIODevice to use.</param> public IODatabase([NotNull] IDatabaseIODevice dbIODevice) : this(dbIODevice, EqualityComparer <byte[]> .Default) { }
public static IDatabase <byte[], byte[]> UseIODatabase ( [CanBeNull] this DatabaseBuilder builder, [NotNull] IDatabaseIODevice databaseIODevice ) => builder.UseIODatabase(databaseIODevice, out _);
public IOLazyLoader([PublicAPI] IDatabaseIODevice dbIODevice, long position) { _dbIODevice = dbIODevice; _position = position; }