2using System.Threading.Tasks;
20 public static Task<bool>
AddHash(
byte[] Hash)
22 return AddHash(
string.Empty, DateTime.MaxValue, Hash);
31 public static Task<bool>
AddHash(DateTime ExpiresUtc,
byte[] Hash)
33 return AddHash(
string.Empty, ExpiresUtc, Hash);
42 public static Task<bool>
AddHash(
string Realm,
byte[] Hash)
44 return AddHash(Realm, DateTime.MaxValue, Hash);
54 public static Task<bool>
AddHash(
string Realm, DateTime ExpiresUtc,
byte[] Hash)
56 return AddHash(Realm, ExpiresUtc, Hash,
null);
66 public static Task<bool>
AddHash(
string Realm,
byte[] Hash,
object AssociatedObject)
68 return AddHash(Realm, DateTime.MaxValue, Hash, AssociatedObject);
79 public static async Task<bool>
AddHash(
string Realm, DateTime ExpiresUtc,
byte[] Hash,
80 object AssociatedObject)
95 ExpiresUtc = ExpiresUtc.ToUniversalTime(),
97 AssociatedObject = AssociatedObject
123 public static async Task<bool>
VerifyHash(
string Realm,
byte[] Hash)
132 return !(Obj is
null);
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static async Task Insert(object Object)
Inserts an object into the default collection of the database.
This filter selects objects that conform to all child-filters provided.
This filter selects objects that have a named field equal to a given value.
Contains information about a persisted hash
object AssociatedObject
Associated object
Static class managing persistent counters.
static async Task< bool > AddHash(string Realm, DateTime ExpiresUtc, byte[] Hash, object AssociatedObject)
Persists a hash.
static async Task< bool > VerifyHash(string Realm, byte[] Hash)
Verifies if a hash value has been persisted in the database.
static Task< bool > VerifyHash(byte[] Hash)
Verifies if a hash value has been persisted in the database, using the default (empty) realm.
static Task< bool > AddHash(DateTime ExpiresUtc, byte[] Hash)
Persists a hash, using the default (empty) realm.
static Task< bool > AddHash(string Realm, byte[] Hash)
Persists a hash.
static Task< object > TryGetAssociatedObject(byte[] Hash)
Tries to get the associated object of a hash value that has been persisted in the database,...
static Task< bool > AddHash(string Realm, DateTime ExpiresUtc, byte[] Hash)
Persists a hash.
static Task< bool > AddHash(byte[] Hash)
Persists a hash, using the default (empty) realm.
static async Task< object > TryGetAssociatedObject(string Realm, byte[] Hash)
Tries to get the associated object of a hash value that has been persisted in the database.
static Task< bool > AddHash(string Realm, byte[] Hash, object AssociatedObject)
Persists a hash.
Represents a named semaphore, i.e. an object, identified by a name, that allows single concurrent wri...
Static class of application-wide semaphores that can be used to order access to editable objects.
static async Task< Semaphore > BeginRead(string Key)
Waits until the semaphore identified by Key is ready for reading. Each call to BeginRead must be fol...
static async Task< Semaphore > BeginWrite(string Key)
Waits until the semaphore identified by Key is ready for writing. Each call to BeginWrite must be fo...