-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed eager sync on construction of ExistingTimeouts
- Loading branch information
Showing
6 changed files
with
84 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
|
||
namespace Cleipnir.ResilientFunctions.Domain; | ||
|
||
public class TimeoutId | ||
{ | ||
public string Value { get; } | ||
public TimeoutId(string value) | ||
{ | ||
ArgumentNullException.ThrowIfNull(value); | ||
Delimiters.EnsureNoUnitSeparator(value); | ||
|
||
Value = value; | ||
} | ||
|
||
public static implicit operator TimeoutId(string flowInstance) => new(flowInstance); | ||
public override string ToString() => Value; | ||
public static bool operator ==(TimeoutId id1, TimeoutId id2) => id1.Equals(id2); | ||
public static bool operator !=(TimeoutId id1, TimeoutId id2) => !(id1 == id2); | ||
|
||
public override bool Equals(object? obj) | ||
=> obj is TimeoutId id && id.Value == Value; | ||
public override int GetHashCode() => Value.GetHashCode(); | ||
} |