Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Utils/ActivityIdGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ public static class ActivityIdGenerator
// UUID epoch (October 15, 1582) and Unix epoch (January 1, 1970)
private static long UuidEpochDifference = 122192928000000000;

/// <summary>Generates an Activity ID for the given epoch timestamp and foreign ID.</summary>
/// <summary>Generates an Activity ID for the given foreign ID and epoch timestamp.</summary>
public static Guid GenerateId(string foreignId, int epoch)
{
return GenerateId(foreignId, Epoch.AddSeconds(epoch));
}

/// <summary>
/// Generates an Activity ID for the given timestamp and foreign ID.
/// <paramref name="timestamp"/> must be UTC.
/// Generates an Activity ID for the given foreign ID and timestamp.
/// </summary>
/// <exception cref="ArgumentException">Raised if the timestamp kind if not UTC.</exception>
public static Guid GenerateId(string foreignId, DateTime timestamp)
{
// The backend doesn't care about milliseconds, so we truncate the date here.
Expand Down