Skip to content

Commit 8dc6abb

Browse files
Merge branch 'master' into serializer-update
2 parents 0741d59 + f41314e commit 8dc6abb

21 files changed

+2524
-2012
lines changed

Microsoft.Toolkit/Diagnostics/Generated/Guard.Comparable.Numeric.g.cs

Lines changed: 502 additions & 0 deletions
Large diffs are not rendered by default.

Microsoft.Toolkit/Diagnostics/Generated/Guard.Comparable.Numeric.tt

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ namespace Microsoft.Toolkit.Diagnostics
1313
public static partial class Guard
1414
{
1515
<#
16-
GenerateTextForItems(NumericTypes, type =>
16+
GenerateTextForItems(NumericTypes, typeInfo =>
1717
{
18+
var (type, prefix) = typeInfo;
1819
#>
1920
/// <summary>
2021
/// Asserts that the input value must be equal to a specified value.
2122
/// </summary>
22-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
23-
/// <param name="target">The target <see cref="<#=type#>"/> value to test for.</param>
23+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
24+
/// <param name="target">The target <see <#=prefix#>="<#=type#>"/> value to test for.</param>
2425
/// <param name="name">The name of the input parameter being tested.</param>
2526
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is != <paramref name="target"/>.</exception>
2627
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -37,8 +38,8 @@ GenerateTextForItems(NumericTypes, type =>
3738
/// <summary>
3839
/// Asserts that the input value must be not equal to a specified value.
3940
/// </summary>
40-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
41-
/// <param name="target">The target <see cref="<#=type#>"/> value to test for.</param>
41+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
42+
/// <param name="target">The target <see <#=prefix#>="<#=type#>"/> value to test for.</param>
4243
/// <param name="name">The name of the input parameter being tested.</param>
4344
/// <exception cref="ArgumentException">Thrown if <paramref name="value"/> is == <paramref name="target"/>.</exception>
4445
/// <remarks>The method is generic to avoid boxing the parameters, if they are value types.</remarks>
@@ -56,8 +57,8 @@ GenerateTextForItems(NumericTypes, type =>
5657
/// <summary>
5758
/// Asserts that the input value must be less than a specified value.
5859
/// </summary>
59-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
60-
/// <param name="maximum">The exclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
60+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
61+
/// <param name="maximum">The exclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
6162
/// <param name="name">The name of the input parameter being tested.</param>
6263
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is >= <paramref name="maximum"/>.</exception>
6364
/// <remarks>The method is generic to avoid boxing the parameters, if they are value types.</remarks>
@@ -75,8 +76,8 @@ GenerateTextForItems(NumericTypes, type =>
7576
/// <summary>
7677
/// Asserts that the input value must be less than or equal to a specified value.
7778
/// </summary>
78-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
79-
/// <param name="maximum">The inclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
79+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
80+
/// <param name="maximum">The inclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
8081
/// <param name="name">The name of the input parameter being tested.</param>
8182
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is > <paramref name="maximum"/>.</exception>
8283
/// <remarks>The method is generic to avoid boxing the parameters, if they are value types.</remarks>
@@ -94,8 +95,8 @@ GenerateTextForItems(NumericTypes, type =>
9495
/// <summary>
9596
/// Asserts that the input value must be greater than a specified value.
9697
/// </summary>
97-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
98-
/// <param name="minimum">The exclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
98+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
99+
/// <param name="minimum">The exclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
99100
/// <param name="name">The name of the input parameter being tested.</param>
100101
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is &lt;= <paramref name="minimum"/>.</exception>
101102
/// <remarks>The method is generic to avoid boxing the parameters, if they are value types.</remarks>
@@ -113,8 +114,8 @@ GenerateTextForItems(NumericTypes, type =>
113114
/// <summary>
114115
/// Asserts that the input value must be greater than or equal to a specified value.
115116
/// </summary>
116-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
117-
/// <param name="minimum">The inclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
117+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
118+
/// <param name="minimum">The inclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
118119
/// <param name="name">The name of the input parameter being tested.</param>
119120
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is &lt; <paramref name="minimum"/>.</exception>
120121
/// <remarks>The method is generic to avoid boxing the parameters, if they are value types.</remarks>
@@ -132,9 +133,9 @@ GenerateTextForItems(NumericTypes, type =>
132133
/// <summary>
133134
/// Asserts that the input value must be in a given range.
134135
/// </summary>
135-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
136-
/// <param name="minimum">The inclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
137-
/// <param name="maximum">The exclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
136+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
137+
/// <param name="minimum">The inclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
138+
/// <param name="maximum">The exclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
138139
/// <param name="name">The name of the input parameter being tested.</param>
139140
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is &lt; <paramref name="minimum"/> or >= <paramref name="maximum"/>.</exception>
140141
/// <remarks>
@@ -155,9 +156,9 @@ GenerateTextForItems(NumericTypes, type =>
155156
/// <summary>
156157
/// Asserts that the input value must not be in a given range.
157158
/// </summary>
158-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
159-
/// <param name="minimum">The inclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
160-
/// <param name="maximum">The exclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
159+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
160+
/// <param name="minimum">The inclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
161+
/// <param name="maximum">The exclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
161162
/// <param name="name">The name of the input parameter being tested.</param>
162163
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is >= <paramref name="minimum"/> or &lt; <paramref name="maximum"/>.</exception>
163164
/// <remarks>
@@ -178,9 +179,9 @@ GenerateTextForItems(NumericTypes, type =>
178179
/// <summary>
179180
/// Asserts that the input value must be in a given interval.
180181
/// </summary>
181-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
182-
/// <param name="minimum">The exclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
183-
/// <param name="maximum">The exclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
182+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
183+
/// <param name="minimum">The exclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
184+
/// <param name="maximum">The exclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
184185
/// <param name="name">The name of the input parameter being tested.</param>
185186
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is &lt;= <paramref name="minimum"/> or >= <paramref name="maximum"/>.</exception>
186187
/// <remarks>
@@ -201,9 +202,9 @@ GenerateTextForItems(NumericTypes, type =>
201202
/// <summary>
202203
/// Asserts that the input value must not be in a given interval.
203204
/// </summary>
204-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
205-
/// <param name="minimum">The exclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
206-
/// <param name="maximum">The exclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
205+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
206+
/// <param name="minimum">The exclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
207+
/// <param name="maximum">The exclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
207208
/// <param name="name">The name of the input parameter being tested.</param>
208209
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is > <paramref name="minimum"/> or &lt; <paramref name="maximum"/>.</exception>
209210
/// <remarks>
@@ -224,9 +225,9 @@ GenerateTextForItems(NumericTypes, type =>
224225
/// <summary>
225226
/// Asserts that the input value must be in a given interval.
226227
/// </summary>
227-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
228-
/// <param name="minimum">The inclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
229-
/// <param name="maximum">The inclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
228+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
229+
/// <param name="minimum">The inclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
230+
/// <param name="maximum">The inclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
230231
/// <param name="name">The name of the input parameter being tested.</param>
231232
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is &lt; <paramref name="minimum"/> or > <paramref name="maximum"/>.</exception>
232233
/// <remarks>
@@ -247,9 +248,9 @@ GenerateTextForItems(NumericTypes, type =>
247248
/// <summary>
248249
/// Asserts that the input value must not be in a given interval.
249250
/// </summary>
250-
/// <param name="value">The input <see cref="<#=type#>"/> value to test.</param>
251-
/// <param name="minimum">The inclusive minimum <see cref="<#=type#>"/> value that is accepted.</param>
252-
/// <param name="maximum">The inclusive maximum <see cref="<#=type#>"/> value that is accepted.</param>
251+
/// <param name="value">The input <see <#=prefix#>="<#=type#>"/> value to test.</param>
252+
/// <param name="minimum">The inclusive minimum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
253+
/// <param name="maximum">The inclusive maximum <see <#=prefix#>="<#=type#>"/> value that is accepted.</param>
253254
/// <param name="name">The name of the input parameter being tested.</param>
254255
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="value"/> is >= <paramref name="minimum"/> or &lt;= <paramref name="maximum"/>.</exception>
255256
/// <remarks>

0 commit comments

Comments
 (0)