@@ -71,7 +71,7 @@ public IReadOnlyCollection<string> Features
71
71
public bool IsAlive { get ; private set ; }
72
72
73
73
/// <summary> When marked dead this reflects the date that the node has to be taken out of rotation till</summary>
74
- public DateTime DeadUntil { get ; private set ; }
74
+ public DateTimeOffset DeadUntil { get ; private set ; }
75
75
76
76
/// <summary> The number of failed attempts trying to use this node, resets when a node is marked alive</summary>
77
77
public int FailedAttempts { get ; private set ; }
@@ -85,17 +85,16 @@ public IReadOnlyCollection<string> Features
85
85
/// </summary>
86
86
public bool HasFeature ( string feature ) => _features . Count == 0 || _featureSet . Contains ( feature ) ;
87
87
88
-
89
88
/// <summary>
90
- /// Marks this node as dead and set the date (see <paramref name="untill "/>) after which we want it to come back alive
89
+ /// Marks this node as dead and set the date (see <paramref name="until "/>) after which we want it to come back alive
91
90
/// </summary>
92
- /// <param name="untill ">The <see cref="DateTime"/> after which this node should be considered alive again</param>
93
- public void MarkDead ( DateTime untill )
91
+ /// <param name="until ">The <see cref="DateTime"/> after which this node should be considered alive again</param>
92
+ public void MarkDead ( DateTimeOffset until )
94
93
{
95
94
FailedAttempts ++ ;
96
95
IsAlive = false ;
97
96
IsResurrected = false ;
98
- DeadUntil = untill ;
97
+ DeadUntil = until ;
99
98
}
100
99
101
100
/// <summary> Mark the node alive explicitly </summary>
@@ -104,20 +103,20 @@ public void MarkAlive()
104
103
FailedAttempts = 0 ;
105
104
IsAlive = true ;
106
105
IsResurrected = false ;
107
- DeadUntil = default ( DateTime ) ;
106
+ DeadUntil = default ;
108
107
}
109
108
110
109
/// <summary>
111
110
/// Use the nodes uri as root to create a <see cref="Uri"/> with <paramref name="path"/>
112
111
/// </summary>
113
- public Uri CreatePath ( string path ) => new Uri ( Uri , path ) ;
112
+ public Uri CreatePath ( string path ) => new ( Uri , path ) ;
114
113
115
114
/// <summary>
116
115
/// Create a clone of the current node. This is used by <see cref="NodePool"/> implementations that supports reseeding the
117
116
/// list of nodes through <see cref="NodePool.Reseed"/>
118
117
/// </summary>
119
118
public Node Clone ( ) =>
120
- new Node ( Uri , Features )
119
+ new ( Uri , Features )
121
120
{
122
121
IsResurrected = IsResurrected ,
123
122
Id = Id ,
@@ -146,7 +145,7 @@ public bool Equals(Node other)
146
145
public static bool operator != ( Node left , Node right ) => ! ( left == right ) ;
147
146
148
147
/// <inheritdoc cref="Equals(Node)"/>
149
- public static implicit operator Node ( Uri uri ) => new Node ( uri ) ;
148
+ public static implicit operator Node ( Uri uri ) => new ( uri ) ;
150
149
151
150
/// <inheritdoc cref="Equals(Node)"/>
152
151
public override bool Equals ( object obj )
0 commit comments