Skip to content

Commit

Permalink
make EphemeralMetadata static factories internal
Browse files Browse the repository at this point in the history
  • Loading branch information
Confusingboat committed Jun 2, 2023
1 parent 98ad66c commit bf53733
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Ephemerally/EphemeralMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ internal EphemeralMetadata(

public override string ToString() => FullName;

public static string GetFullName(
internal static string GetFullName(
long expirationTimestamp,
string nonce,
string name) =>
$"{PrefixValue}_{expirationTimestamp}_{nonce}_{name}";

public static EphemeralMetadata New(string fullName) =>
internal static EphemeralMetadata New(string fullName) =>
fullName.Split('_') is
[PrefixValue, var ts, var nonce, var friendlyName] &&
long.TryParse(ts, out var timestamp)
? new(DateTimeOffset.FromUnixTimeMilliseconds(timestamp), nonce, friendlyName)
: new(fullName);

public static EphemeralMetadata New(
internal static EphemeralMetadata New(
string name,
DateTimeOffset? expiration)
{
Expand Down

0 comments on commit bf53733

Please sign in to comment.