@@ -26,14 +26,14 @@ public class Error
2626 {
2727 /// <summary>
2828 /// Initialize a new Error instance from a particular
29- /// ErrorCode value.
29+ /// <see cref=" ErrorCode"/> value.
3030 /// </summary>
3131 /// <param name="code">
32- /// The ErrorCode value associated with this Error.
32+ /// The <see cref=" ErrorCode"/> value associated with this Error.
3333 /// </param>
3434 /// <remarks>
3535 /// The reason string associated with this Error will
36- /// be a static value associated with the ErrorCode.
36+ /// be a static value associated with the <see cref=" ErrorCode"/> .
3737 /// </remarks>
3838 public Error ( ErrorCode code )
3939 {
@@ -43,11 +43,11 @@ public Error(ErrorCode code)
4343
4444 /// <summary>
4545 /// Initialize a new Error instance from a particular
46- /// ErrorCode value and custom <paramref name="reason"/>
46+ /// <see cref=" ErrorCode"/> value and custom <paramref name="reason"/>
4747 /// string.
4848 /// </summary>
4949 /// <param name="code">
50- /// The ErrorCode value associated with this Error.
50+ /// The <see cref=" ErrorCode"/> value associated with this Error.
5151 /// </param>
5252 /// <param name="reason">
5353 /// A custom reason string associated with the error
@@ -61,7 +61,7 @@ public Error(ErrorCode code, string reason)
6161 }
6262
6363 /// <summary>
64- /// Gets the ErrorCode associated with this Error.
64+ /// Gets the <see cref=" ErrorCode"/> associated with this Error.
6565 /// </summary>
6666 public ErrorCode Code { get ; }
6767
@@ -93,15 +93,42 @@ public bool IsLocalError
9393 public bool IsBrokerError
9494 => ( int ) Code > 0 ;
9595
96+ /// <summary>
97+ /// Converts the specified Error value to a boolean value (false if e.Code == ErrorCode.NoError, true otherwise).
98+ /// </summary>
99+ /// <param name="e">
100+ /// The Error value to convert.
101+ /// </param>
96102 public static implicit operator bool ( Error e )
97103 => e . HasError ;
98104
105+ /// <summary>
106+ /// Converts the specified Error value to the value of it's Code property.
107+ /// </summary>
108+ /// <param name="e">
109+ /// The Error value to convert.
110+ /// </param>
99111 public static implicit operator ErrorCode ( Error e )
100112 => e . Code ;
101113
114+ /// <summary>
115+ /// Converts the specified <see cref="ErrorCode"/> value to it's corresponding rich Error value.
116+ /// </summary>
117+ /// <param name="c">
118+ /// The <see cref="ErrorCode"/> value to convert.
119+ /// </param>
102120 public static implicit operator Error ( ErrorCode c )
103121 => new Error ( c ) ;
104122
123+ /// <summary>
124+ /// Tests whether this Error instance is equal to the specified object.
125+ /// </summary>
126+ /// <param name="obj">
127+ /// The object to test.
128+ /// </param>
129+ /// <returns>
130+ /// true if obj is an Error and the Code property values are equal. false otherwise.
131+ /// </returns>
105132 public override bool Equals ( object obj )
106133 {
107134 if ( ! ( obj is Error ) )
@@ -112,12 +139,42 @@ public override bool Equals(object obj)
112139 return ( ( Error ) obj ) . Code == Code ;
113140 }
114141
142+ /// <summary>
143+ /// Returns a hash code for this Error value.
144+ /// </summary>
145+ /// <returns>
146+ /// An integer that specifies a hash value for this Error value.
147+ /// </returns>
115148 public override int GetHashCode ( )
116149 => Code . GetHashCode ( ) ;
117150
151+ /// <summary>
152+ /// Tests whether Error value a is equal to Error value b.
153+ /// </summary>
154+ /// <param name="a">
155+ /// The first Error value to compare.
156+ /// </param>
157+ /// <param name="b">
158+ /// The second Error value to compare.
159+ /// </param>
160+ /// <returns>
161+ /// true if Error values a and b are equal. false otherwise.
162+ /// </returns>
118163 public static bool operator == ( Error a , Error b )
119164 => a . Equals ( b ) ;
120165
166+ /// <summary>
167+ /// Tests whether Error value a is not equal to Error value b.
168+ /// </summary>
169+ /// <param name="a">
170+ /// The first Error value to compare.
171+ /// </param>
172+ /// <param name="b">
173+ /// The second Error value to compare.
174+ /// </param>
175+ /// <returns>
176+ /// true if Error values a and b are not equal. false otherwise.
177+ /// </returns>
121178 public static bool operator != ( Error a , Error b )
122179 => ! ( a == b ) ;
123180
@@ -127,6 +184,9 @@ public override int GetHashCode()
127184 /// contextual error message, or a simple static
128185 /// string representation of the error Code.
129186 /// </summary>
187+ /// <returns>
188+ /// A string representation of the Error object.
189+ /// </returns>
130190 public override string ToString ( )
131191 {
132192 // If a rich error string is available return that, otherwise fall
0 commit comments