Skip to content

Commit

Permalink
reformat codes
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Mar 5, 2022
1 parent 2056a10 commit 2289d2c
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions src/Smdn.Fundamental.Uuid/Smdn/Uuid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,24 @@ public static Uuid CreateTimeBased(DateTime timestamp, int clock)
);

public static Uuid CreateTimeBased(PhysicalAddress node)
{
if (node == null)
throw new ArgumentNullException(nameof(node));

return CreateTimeBased(node.GetAddressBytes());
}
=> CreateTimeBased(
(node ?? throw new ArgumentNullException(nameof(node))).GetAddressBytes()
);

public static Uuid CreateTimeBased(DateTime timestamp, int clock, PhysicalAddress node)
{
if (node == null)
throw new ArgumentNullException(nameof(node));

return CreateTimeBased(timestamp, clock, node.GetAddressBytes());
}
=> CreateTimeBased(
timestamp,
clock,
(node ?? throw new ArgumentNullException(nameof(node))).GetAddressBytes()
);
#endif

public static Uuid CreateTimeBased(byte[] node)
{
return CreateTimeBased(
GetTimestamp(),
GetClock(),
node);
}
=> CreateTimeBased(
GetTimestamp(),
GetClock(),
node
);

public static Uuid CreateTimeBased(DateTime timestamp, int clock, byte[] node)
{
Expand Down

0 comments on commit 2289d2c

Please sign in to comment.