stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace StellaOps.Provcache;
|
||||
|
||||
public sealed partial class DecisionDigestBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets explicit timestamps for created and expires.
|
||||
/// </summary>
|
||||
public DecisionDigestBuilder WithTimestamps(DateTimeOffset createdAt, DateTimeOffset expiresAt)
|
||||
{
|
||||
_createdAt = createdAt;
|
||||
_expiresAt = expiresAt;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets timestamps using the default TTL from options.
|
||||
/// </summary>
|
||||
public DecisionDigestBuilder WithDefaultTimestamps()
|
||||
{
|
||||
_createdAt = _timeProvider.GetUtcNow();
|
||||
_expiresAt = _createdAt.Value.Add(_options.DefaultTtl);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user