This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
usingSystem;
usingSystem.Threading;
usingSystem.Threading.Tasks;
namespaceZeroLevel.Services.Shedulling
{
internalclassExpiredAsyncObject
{
privatestaticlong_counter=0;
publicExpiredAsyncObject()
{
Key=Interlocked.Increment(ref_counter);
}
publicExpiredAsyncObject(boolhas_no_key)
{
if(has_no_key)
Key=-1;
else
Key=Interlocked.Increment(ref_counter);
}
publicExpiredAsyncObjectReset(DateTimenextDate)
{
ExpirationDate=nextDate;
Next=null;
returnthis;
}
/// <summary>
/// Событие при завершении ожидания
/// </summary>
publicFunc<long,Task>Callback;
/// <summary>
/// Срок истечения ожидания
/// </summary>
publicDateTimeExpirationDate;
/// <summary>
/// Следующий объект с ближайшей датой окончания ожидания