@@ -20,17 +20,17 @@ private Option(T t)
20
20
}
21
21
22
22
/// <summary>
23
- /// Returns true if Option is Some, false otherwise.
23
+ /// Returns true if <see cref=" Option{T}"/> is Some, false otherwise.
24
24
/// </summary>
25
25
public bool IsSome { get ; } = false ;
26
26
27
27
/// <summary>
28
- /// Returns true if Option is None, false otherwise.
28
+ /// Returns true if <see cref=" Option{T}"/> is None, false otherwise.
29
29
/// </summary>
30
30
public bool IsNone => ! IsSome ;
31
31
32
32
/// <summary>
33
- /// If Option is Some evaluate the some delegate, otherwise none.
33
+ /// If <see cref=" Option{T}"/> is Some evaluate the some delegate, otherwise none.
34
34
/// </summary>
35
35
/// <typeparam name="U"></typeparam>
36
36
/// <param name="some"></param>
@@ -42,7 +42,7 @@ public U Match<U>(Func<T, U> some, Func<U> none) =>
42
42
none ( ) ;
43
43
44
44
/// <summary>
45
- /// Evaluates the bind delegate if Option is Some otherwise return None.
45
+ /// Evaluates the bind delegate if <see cref=" Option{T}"/> is Some otherwise return None.
46
46
/// </summary>
47
47
/// <typeparam name="U"></typeparam>
48
48
/// <param name="bind"></param>
@@ -52,7 +52,7 @@ public Option<U> Bind<U>(
52
52
Match ( bind , Option < U > . None ) ;
53
53
54
54
/// <summary>
55
- /// Evaluates the map delegate if Option is Some otherwise return None.
55
+ /// Evaluates the map delegate if <see cref=" Option{T}"/> is Some otherwise return None.
56
56
/// </summary>
57
57
/// <typeparam name="U"></typeparam>
58
58
/// <param name="map"></param>
@@ -62,7 +62,7 @@ public Option<U> Map<U>(
62
62
Bind ( x => Option < U > . Some ( map ( x ) ) ) ;
63
63
64
64
/// <summary>
65
- /// Returns the value of Option if it is T otherwise return default.
65
+ /// Returns the value of <see cref=" Option{T}"/> if it is T otherwise return default.
66
66
/// </summary>
67
67
/// <param name="defaultValue"></param>
68
68
/// <returns></returns>
@@ -71,7 +71,7 @@ public T DefaultValue(
71
71
Match ( some => some , ( ) => defaultValue ) ;
72
72
73
73
/// <summary>
74
- /// Returns the value of Option if it is T otherwise evaluate default.
74
+ /// Returns the value of <see cref=" Option{T}"/> if it is T otherwise evaluate default.
75
75
/// </summary>
76
76
/// <param name="defaultWith"></param>
77
77
/// <returns></returns>
@@ -80,7 +80,7 @@ public T DefaultWith(
80
80
Match ( some => some , ( ) => defaultWith ( ) ) ;
81
81
82
82
/// <summary>
83
- /// Return Option if it is Some, otherwise return ifNone.
83
+ /// Return <see cref=" Option{T}"/> if it is Some, otherwise return ifNone.
84
84
/// </summary>
85
85
/// <param name="ifNone"></param>
86
86
/// <returns></returns>
@@ -89,7 +89,7 @@ public Option<T> OrElse(
89
89
Match ( Option < T > . Some , ( ) => ifNone ) ;
90
90
91
91
/// <summary>
92
- /// Return Option if it is Some, otherwise evaluate ifNoneWith.
92
+ /// Return <see cref=" Option{T}"/> if it is Some, otherwise evaluate ifNoneWith.
93
93
/// </summary>
94
94
/// <param name="ifNoneWith"></param>
95
95
/// <returns></returns>
@@ -99,45 +99,45 @@ public Option<T> OrElseWith(
99
99
100
100
101
101
/// <summary>
102
- /// Creates a new Option with the specified value.
102
+ /// Creates a new <see cref=" Option{T}"/> with the specified value.
103
103
/// </summary>
104
104
/// <param name="value"></param>
105
105
/// <returns></returns>
106
106
public static Option < T > Some ( T value ) =>
107
107
new ( value ) ;
108
108
109
109
/// <summary>
110
- /// Creates Option with the specified value wrapped in a completed Task.
110
+ /// Creates <see cref=" Option{T}"/> with the specified value wrapped in a completed Task.
111
111
/// </summary>
112
112
/// <param name="value"></param>
113
113
/// <returns></returns>
114
114
public static Task < Option < T > > SomeAsync ( T value ) =>
115
115
Task . FromResult ( Some ( value ) ) ;
116
116
117
117
/// <summary>
118
- /// Creates a new Option with the value of the awaited Task.
118
+ /// Creates a new <see cref=" Option{T}"/> with the value of the awaited Task.
119
119
/// </summary>
120
120
/// <param name="value"></param>
121
121
/// <returns></returns>
122
122
public static async Task < Option < T > > SomeAsync ( Task < T > value ) =>
123
123
Some ( await value ) ;
124
124
125
125
/// <summary>
126
- /// Creates a new Option with no value.
126
+ /// Creates a new <see cref=" Option{T}"/> with no value.
127
127
/// </summary>
128
128
/// <returns></returns>
129
129
public static Option < T > None ( ) =>
130
130
new ( ) ;
131
131
132
132
/// <summary>
133
- /// Creates a new Option with no value wrapped in a completed Task.
133
+ /// Creates a new <see cref=" Option{T}"/> with no value wrapped in a completed Task.
134
134
/// </summary>
135
135
/// <returns></returns>
136
136
public static Task < Option < T > > NoneAsync ( ) =>
137
137
Task . FromResult ( None ( ) ) ;
138
138
139
139
/// <summary>
140
- /// Returns true if the specified Options are equal.
140
+ /// Returns true if the specified <see cref="Option{T}"/>s are equal.
141
141
/// </summary>
142
142
/// <param name="left"></param>
143
143
/// <param name="right"></param>
@@ -146,7 +146,7 @@ public static Task<Option<T>> NoneAsync() =>
146
146
left . Equals ( right ) ;
147
147
148
148
/// <summary>
149
- /// Returns true if the specified Options are not equal.
149
+ /// Returns true if the specified <see cref="Option{T}"/>s are not equal.
150
150
/// </summary>
151
151
/// <param name="left"></param>
152
152
/// <param name="right"></param>
@@ -155,15 +155,15 @@ public static Task<Option<T>> NoneAsync() =>
155
155
! ( left == right ) ;
156
156
157
157
/// <summary>
158
- /// Returns true if the specified Options are equal.
158
+ /// Returns true if the specified <see cref="Option{T}"/>s are equal.
159
159
/// </summary>
160
160
/// <param name="obj"></param>
161
161
/// <returns></returns>
162
162
public override bool Equals ( object ? obj ) =>
163
163
obj is Option < T > o && Equals ( o ) ;
164
164
165
165
/// <summary>
166
- /// Returns true if the specified Options are equal.
166
+ /// Returns true if the specified <see cref="Option{T}"/>s are equal.
167
167
/// </summary>
168
168
/// <param name="other"></param>
169
169
/// <returns></returns>
@@ -180,7 +180,7 @@ public readonly bool Equals(Option<T> other) =>
180
180
) ;
181
181
182
182
/// <summary>
183
- /// Returns the hash code of the Option.
183
+ /// Returns the hash code of the <see cref=" Option{T}"/> .
184
184
/// </summary>
185
185
/// <returns></returns>
186
186
public override int GetHashCode ( ) =>
@@ -189,7 +189,7 @@ public override int GetHashCode() =>
189
189
none : ( ) => 0 ) ;
190
190
191
191
/// <summary>
192
- /// Returns the string representation of the Option.
192
+ /// Returns the string representation of the <see cref=" Option{T}"/> .
193
193
/// </summary>
194
194
/// <returns></returns>
195
195
public override string ToString ( ) =>
@@ -199,12 +199,12 @@ public override string ToString() =>
199
199
}
200
200
201
201
/// <summary>
202
- /// Extension methods to allow Option matching using
202
+ /// Extension methods to allow <see cref=" Option{T}"/> matching using
203
203
/// </summary>
204
204
public static class OptionActionExtensions
205
205
{
206
206
/// <summary>
207
- /// If Option is Some, evaluates the some delegate, otherwise evaluates
207
+ /// If <see cref=" Option{T}"/> is Some, evaluates the some delegate, otherwise evaluates
208
208
/// the none delegate.
209
209
/// </summary>
210
210
/// <typeparam name="T"></typeparam>
0 commit comments