stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace StellaOps.Provcache;
|
||||
|
||||
public sealed partial class VeriKeyBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the time window for epoch bucketing.
|
||||
/// </summary>
|
||||
/// <param name="timeWindow">The time window identifier (e.g., "2024-12-24T12:00:00Z").</param>
|
||||
/// <returns>This builder for fluent chaining.</returns>
|
||||
public VeriKeyBuilder WithTimeWindow(string timeWindow)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(timeWindow))
|
||||
throw new ArgumentException("Time window cannot be null or empty.", nameof(timeWindow));
|
||||
|
||||
_timeWindow = timeWindow;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes time window from a timestamp using the configured bucket size.
|
||||
/// </summary>
|
||||
/// <param name="timestamp">The timestamp to bucket.</param>
|
||||
/// <returns>This builder for fluent chaining.</returns>
|
||||
public VeriKeyBuilder WithTimeWindow(DateTimeOffset timestamp)
|
||||
{
|
||||
_timeWindow = _options.ComputeTimeWindow(timestamp);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user