Skip to content

Commit 297406a

Browse files
carlossanlopgewarrenbartonjs
authored
Automatic port of System.Security exceptions (dotnet#4663)
* Automatic port of System.Security exceptions * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * Update xml/System.Security.Claims/ClaimsIdentity.xml Co-authored-by: Genevieve Warren <[email protected]> * suggestions by bartonjs Co-authored-by: Jeremy Barton <[email protected]> Co-authored-by: carlossanlop <[email protected]> Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Jeremy Barton <[email protected]>
1 parent 35a84c3 commit 297406a

File tree

3 files changed

+51
-73
lines changed

3 files changed

+51
-73
lines changed

xml/System.Security.Claims/ClaimsIdentity.xml

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@
274274
<Docs>
275275
<param name="info">The serialized data.</param>
276276
<summary>Initializes a new instance of the <see cref="T:System.Security.Claims.ClaimsIdentity" /> class from a serialized stream created by using <see cref="T:System.Runtime.Serialization.ISerializable" />.</summary>
277-
<remarks>
278-
</remarks>
277+
<remarks>To be added.</remarks>
279278
<exception cref="T:System.ArgumentNullException">
280279
<paramref name="info" /> is <see langword="null" />.</exception>
281280
</Docs>
@@ -333,7 +332,7 @@
333332
]]></format>
334333
</remarks>
335334
<exception cref="T:System.ArgumentNullException">
336-
<paramref name="other" /> is **null**.</exception>
335+
<paramref name="other" /> is <see langword="null" />.</exception>
337336
</Docs>
338337
</Member>
339338
<Member MemberName=".ctor">
@@ -543,10 +542,9 @@
543542
<param name="info">The serialized data.</param>
544543
<param name="context">The context for serialization.</param>
545544
<summary>Initializes a new instance of the <see cref="T:System.Security.Claims.ClaimsIdentity" /> class from a serialized stream created by using <see cref="T:System.Runtime.Serialization.ISerializable" />.</summary>
546-
<remarks>
547-
</remarks>
545+
<remarks>To be added.</remarks>
548546
<exception cref="T:System.ArgumentNullException">
549-
<paramref name="info" /> is **null**.</exception>
547+
<paramref name="info" /> is <see langword="null" />.</exception>
550548
</Docs>
551549
</Member>
552550
<Member MemberName=".ctor">
@@ -836,7 +834,11 @@
836834
837835
]]></format>
838836
</remarks>
839-
<exception cref="T:System.InvalidOperationException">An attempt to set the property to the current instance occurs.</exception>
837+
<exception cref="T:System.InvalidOperationException">An attempt was made to set the property to the current instance.
838+
839+
-or-
840+
841+
<see langword="value" /> results in a circular reference back to <see langword="this" />.</exception>
840842
</Docs>
841843
</Member>
842844
<Member MemberName="AddClaim">
@@ -1147,8 +1149,7 @@
11471149
<Docs>
11481150
<summary>Returns a new <see cref="T:System.Security.Claims.ClaimsIdentity" /> copied from this claims identity.</summary>
11491151
<returns>A copy of the current instance.</returns>
1150-
<remarks>
1151-
</remarks>
1152+
<remarks>To be added.</remarks>
11521153
</Docs>
11531154
</Member>
11541155
<Member MemberName="CreateClaim">
@@ -1188,8 +1189,7 @@
11881189
<param name="reader">The <see cref="T:System.IO.BinaryReader" /> that points to the claim.</param>
11891190
<summary>Provides an extensibility point for derived types to create a custom <see cref="T:System.Security.Claims.Claim" />.</summary>
11901191
<returns>A new <see cref="T:System.Security.Claims.Claim" />.</returns>
1191-
<remarks>
1192-
</remarks>
1192+
<remarks>To be added.</remarks>
11931193
<exception cref="T:System.ArgumentNullException">
11941194
<paramref name="reader" /> is <see langword="null" />.</exception>
11951195
</Docs>
@@ -1228,8 +1228,7 @@
12281228
<Docs>
12291229
<summary>Contains any additional data provided by a derived type. Typically set when calling <see cref="M:System.Security.Claims.ClaimsIdentity.WriteTo(System.IO.BinaryWriter,System.Byte[])" />.</summary>
12301230
<value>A <see cref="T:System.Byte" /> array representing the additional serialized data.</value>
1231-
<remarks>
1232-
</remarks>
1231+
<remarks>To be added.</remarks>
12331232
</Docs>
12341233
</Member>
12351234
<Member MemberName="DefaultIssuer">
@@ -1264,8 +1263,7 @@
12641263
</ReturnValue>
12651264
<Docs>
12661265
<summary>The default issuer; "LOCAL AUTHORITY".</summary>
1267-
<remarks>
1268-
</remarks>
1266+
<remarks>To be added.</remarks>
12691267
</Docs>
12701268
</Member>
12711269
<Member MemberName="DefaultNameClaimType">
@@ -1300,8 +1298,7 @@
13001298
</ReturnValue>
13011299
<Docs>
13021300
<summary>The default name claim type; <see cref="F:System.Security.Claims.ClaimTypes.Name" />.</summary>
1303-
<remarks>
1304-
</remarks>
1301+
<remarks>To be added.</remarks>
13051302
</Docs>
13061303
</Member>
13071304
<Member MemberName="DefaultRoleClaimType">
@@ -1336,8 +1333,7 @@
13361333
</ReturnValue>
13371334
<Docs>
13381335
<summary>The default role claim type; <see cref="F:System.Security.Claims.ClaimTypes.Role" />.</summary>
1339-
<remarks>
1340-
</remarks>
1336+
<remarks>To be added.</remarks>
13411337
</Docs>
13421338
</Member>
13431339
<MemberGroup MemberName="FindAll">
@@ -1387,10 +1383,9 @@
13871383
<param name="match">The function that performs the matching logic.</param>
13881384
<summary>Retrieves all of the claims that are matched by the specified predicate.</summary>
13891385
<returns>The matching claims. The list is read-only.</returns>
1390-
<remarks>
1391-
</remarks>
1386+
<remarks>To be added.</remarks>
13921387
<exception cref="T:System.ArgumentNullException">
1393-
<paramref name="match" /> is **null**.</exception>
1388+
<paramref name="match" /> is <see langword="null" />.</exception>
13941389
</Docs>
13951390
</Member>
13961391
<Member MemberName="FindAll">
@@ -1439,7 +1434,7 @@
14391434
]]></format>
14401435
</remarks>
14411436
<exception cref="T:System.ArgumentNullException">
1442-
<paramref name="type" /> is **null**.</exception>
1437+
<paramref name="type" /> is <see langword="null" />.</exception>
14431438
</Docs>
14441439
</Member>
14451440
<MemberGroup MemberName="FindFirst">
@@ -1490,10 +1485,9 @@
14901485
<param name="match">The function that performs the matching logic.</param>
14911486
<summary>Retrieves the first claim that is matched by the specified predicate.</summary>
14921487
<returns>The first matching claim or <see langword="null" /> if no match is found.</returns>
1493-
<remarks>
1494-
</remarks>
1488+
<remarks>To be added.</remarks>
14951489
<exception cref="T:System.ArgumentNullException">
1496-
<paramref name="match" /> is **null**.</exception>
1490+
<paramref name="match" /> is <see langword="null" />.</exception>
14971491
</Docs>
14981492
</Member>
14991493
<Member MemberName="FindFirst">
@@ -1542,7 +1536,7 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
15421536
]]></format>
15431537
</remarks>
15441538
<exception cref="T:System.ArgumentNullException">
1545-
<paramref name="type" /> is **null**.</exception>
1539+
<paramref name="type" /> is <see langword="null" />.</exception>
15461540
</Docs>
15471541
</Member>
15481542
<Member MemberName="GetObjectData">
@@ -1587,8 +1581,7 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
15871581
<param name="info">The object to populate with data.</param>
15881582
<param name="context">The destination for this serialization. Can be <see langword="null" />.</param>
15891583
<summary>Populates the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with data needed to serialize the current <see cref="T:System.Security.Claims.ClaimsIdentity" /> object.</summary>
1590-
<remarks>
1591-
</remarks>
1584+
<remarks>To be added.</remarks>
15921585
<exception cref="T:System.ArgumentNullException">
15931586
<paramref name="info" /> is <see langword="null" />.</exception>
15941587
</Docs>
@@ -1641,10 +1634,9 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
16411634
<summary>Determines whether this claims identity has a claim that is matched by the specified predicate.</summary>
16421635
<returns>
16431636
<see langword="true" /> if a matching claim exists; otherwise, <see langword="false" />.</returns>
1644-
<remarks>
1645-
</remarks>
1637+
<remarks>To be added.</remarks>
16461638
<exception cref="T:System.ArgumentNullException">
1647-
<paramref name="match" /> is **null**.</exception>
1639+
<paramref name="match" /> is <see langword="null" />.</exception>
16481640
</Docs>
16491641
</Member>
16501642
<Member MemberName="HasClaim">
@@ -1696,11 +1688,7 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
16961688
]]></format>
16971689
</remarks>
16981690
<exception cref="T:System.ArgumentNullException">
1699-
<paramref name="type" /> is **null**.
1700-
1701-
-or-
1702-
1703-
<paramref name="value" /> is **null**.</exception>
1691+
<paramref name="type" /> or <paramref name="value" /> is <see langword="null" />.</exception>
17041692
</Docs>
17051693
</Member>
17061694
<Member MemberName="IsAuthenticated">
@@ -1784,8 +1772,7 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
17841772
<Docs>
17851773
<summary>Gets or sets the label for this claims identity.</summary>
17861774
<value>The label.</value>
1787-
<remarks>
1788-
</remarks>
1775+
<remarks>To be added.</remarks>
17891776
</Docs>
17901777
</Member>
17911778
<Member MemberName="Name">
@@ -2077,8 +2064,7 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
20772064
<Docs>
20782065
<param name="writer">The writer to use for data storage.</param>
20792066
<summary>Serializes using a <see cref="T:System.IO.BinaryWriter" />.</summary>
2080-
<remarks>
2081-
</remarks>
2067+
<remarks>To be added.</remarks>
20822068
<exception cref="T:System.ArgumentNullException">
20832069
<paramref name="writer" /> is <see langword="null" />.</exception>
20842070
</Docs>
@@ -2122,8 +2108,7 @@ The comparison is done in <xref:System.StringComparison.OrdinalIgnoreCase?displa
21222108
<param name="writer">The writer to use for data storage.</param>
21232109
<param name="userData">Additional data provided by the derived type.</param>
21242110
<summary>Serializes using a <see cref="T:System.IO.BinaryWriter" />.</summary>
2125-
<remarks>
2126-
</remarks>
2111+
<remarks>To be added.</remarks>
21272112
<exception cref="T:System.ArgumentNullException">
21282113
<paramref name="writer" /> is <see langword="null" />.</exception>
21292114
</Docs>

xml/System.Security.Claims/ClaimsPrincipal.xml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ if (null != principal)
190190
]]></format>
191191
</remarks>
192192
<exception cref="T:System.ArgumentNullException">
193-
<paramref name="identities" /> is **null**.</exception>
193+
<paramref name="identities" /> is <see langword="null" />.</exception>
194194
</Docs>
195195
</Member>
196196
<Member MemberName=".ctor">
@@ -280,7 +280,7 @@ if (null != principal)
280280
]]></format>
281281
</remarks>
282282
<exception cref="T:System.ArgumentNullException">
283-
<paramref name="identity" /> is **null**.</exception>
283+
<paramref name="identity" /> is <see langword="null" />.</exception>
284284
</Docs>
285285
</Member>
286286
<Member MemberName=".ctor">
@@ -325,7 +325,7 @@ if (null != principal)
325325
]]></format>
326326
</remarks>
327327
<exception cref="T:System.ArgumentNullException">
328-
<paramref name="principal" /> is **null**.</exception>
328+
<paramref name="principal" /> is <see langword="null" />.</exception>
329329
</Docs>
330330
</Member>
331331
<Member MemberName=".ctor">
@@ -367,8 +367,7 @@ if (null != principal)
367367
<param name="info">The serialized data.</param>
368368
<param name="context">The context for serialization.</param>
369369
<summary>Initializes a new instance of the <see cref="T:System.Security.Claims.ClaimsPrincipal" /> class from a serialized stream created by using <see cref="T:System.Runtime.Serialization.ISerializable" />.</summary>
370-
<remarks>
371-
</remarks>
370+
<remarks>To be added.</remarks>
372371
<exception cref="T:System.ArgumentNullException">
373372
<paramref name="info" /> is **null**.</exception>
374373
</Docs>
@@ -424,7 +423,7 @@ if (null != principal)
424423
]]></format>
425424
</remarks>
426425
<exception cref="T:System.ArgumentNullException">
427-
<paramref name="identities" /> is **null**.</exception>
426+
<paramref name="identities" /> is <see langword="null" />.</exception>
428427
</Docs>
429428
</Member>
430429
<Member MemberName="AddIdentity">
@@ -478,7 +477,7 @@ if (null != principal)
478477
]]></format>
479478
</remarks>
480479
<exception cref="T:System.ArgumentNullException">
481-
<paramref name="identity" /> is **null**.</exception>
480+
<paramref name="identity" /> is <see langword="null" />.</exception>
482481
</Docs>
483482
</Member>
484483
<Member MemberName="Claims">
@@ -620,8 +619,7 @@ if (null != principal)
620619
<Docs>
621620
<summary>Returns a copy of this instance.</summary>
622621
<returns>A new copy of the <see cref="T:System.Security.Claims.ClaimsPrincipal" /> object.</returns>
623-
<remarks>
624-
</remarks>
622+
<remarks>To be added.</remarks>
625623
</Docs>
626624
</Member>
627625
<Member MemberName="CreateClaimsIdentity">
@@ -661,8 +659,7 @@ if (null != principal)
661659
<param name="reader">The binary reader.</param>
662660
<summary>Creates a new claims identity.</summary>
663661
<returns>The created claims identity.</returns>
664-
<remarks>
665-
</remarks>
662+
<remarks>To be added.</remarks>
666663
<exception cref="T:System.ArgumentNullException">
667664
<paramref name="reader" /> is <see langword="null" />.</exception>
668665
</Docs>
@@ -746,8 +743,7 @@ if (null != principal)
746743
<Docs>
747744
<summary>Contains any additional data provided by a derived type. Typically set when calling <see cref="M:System.Security.Claims.ClaimsIdentity.WriteTo(System.IO.BinaryWriter,System.Byte[])" />.</summary>
748745
<value>A <see cref="T:System.Byte" /> array representing the additional serialized data.</value>
749-
<remarks>
750-
</remarks>
746+
<remarks>To be added.</remarks>
751747
</Docs>
752748
</Member>
753749
<MemberGroup MemberName="FindAll">
@@ -806,7 +802,7 @@ if (null != principal)
806802
]]></format>
807803
</remarks>
808804
<exception cref="T:System.ArgumentNullException">
809-
<paramref name="match" /> is **null**.</exception>
805+
<paramref name="match" /> is <see langword="null" />.</exception>
810806
</Docs>
811807
</Member>
812808
<Member MemberName="FindAll">
@@ -855,7 +851,7 @@ if (null != principal)
855851
]]></format>
856852
</remarks>
857853
<exception cref="T:System.ArgumentNullException">
858-
<paramref name="type" /> is **null**.</exception>
854+
<paramref name="type" /> is <see langword="null" />.</exception>
859855
</Docs>
860856
</Member>
861857
<MemberGroup MemberName="FindFirst">
@@ -919,7 +915,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
919915
]]></format>
920916
</remarks>
921917
<exception cref="T:System.ArgumentNullException">
922-
<paramref name="match" /> is **null**.</exception>
918+
<paramref name="match" /> is <see langword="null" />.</exception>
923919
</Docs>
924920
</Member>
925921
<Member MemberName="FindFirst">
@@ -974,7 +970,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
974970
]]></format>
975971
</remarks>
976972
<exception cref="T:System.ArgumentNullException">
977-
<paramref name="type" /> is **null**.</exception>
973+
<paramref name="type" /> is <see langword="null" />.</exception>
978974
</Docs>
979975
</Member>
980976
<Member MemberName="GetObjectData">
@@ -1019,8 +1015,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
10191015
<param name="info">The object to populate with data.</param>
10201016
<param name="context">The destination for this serialization. Can be <see langword="null" />.</param>
10211017
<summary>Populates the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with data needed to serialize the current <see cref="T:System.Security.Claims.ClaimsPrincipal" /> object.</summary>
1022-
<remarks>
1023-
</remarks>
1018+
<remarks>To be added.</remarks>
10241019
<exception cref="T:System.ArgumentNullException">
10251020
<paramref name="info" /> is <see langword="null" />.</exception>
10261021
</Docs>
@@ -1087,7 +1082,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
10871082
]]></format>
10881083
</remarks>
10891084
<exception cref="T:System.ArgumentNullException">
1090-
<paramref name="match" /> is **null**.</exception>
1085+
<paramref name="match" /> is <see langword="null" />.</exception>
10911086
</Docs>
10921087
</Member>
10931088
<Member MemberName="HasClaim">
@@ -1139,11 +1134,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
11391134
]]></format>
11401135
</remarks>
11411136
<exception cref="T:System.ArgumentNullException">
1142-
<paramref name="type" /> is **null**.
1143-
1144-
-or-
1145-
1146-
<paramref name="value" /> is **null**.</exception>
1137+
<paramref name="type" /> or <paramref name="value" /> is <see langword="null" />.</exception>
11471138
</Docs>
11481139
</Member>
11491140
<Member MemberName="Identities">
@@ -1382,8 +1373,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
13821373
<Docs>
13831374
<param name="writer">The writer to use for data storage.</param>
13841375
<summary>Serializes using a <see cref="T:System.IO.BinaryWriter" />.</summary>
1385-
<remarks>
1386-
</remarks>
1376+
<remarks>To be added.</remarks>
13871377
<exception cref="T:System.ArgumentNullException">
13881378
<paramref name="writer" /> is <see langword="null" />.</exception>
13891379
</Docs>
@@ -1427,8 +1417,7 @@ Each <xref:System.Security.Claims.ClaimsIdentity> is called.
14271417
<param name="writer">The writer to use for data storage.</param>
14281418
<param name="userData">Additional data provided by the derived type.</param>
14291419
<summary>Serializes using a <see cref="T:System.IO.BinaryWriter" />.</summary>
1430-
<remarks>
1431-
</remarks>
1420+
<remarks>To be added.</remarks>
14321421
<exception cref="T:System.ArgumentNullException">
14331422
<paramref name="writer" /> is <see langword="null" />.</exception>
14341423
</Docs>

0 commit comments

Comments
 (0)