Skip to content

Commit b6b9d5f

Browse files
authored
Merge pull request #4241 from dotnet/publish-9619
Merge master into live
2 parents 24cfe33 + aa1f4d4 commit b6b9d5f

File tree

8 files changed

+75
-38
lines changed

8 files changed

+75
-38
lines changed

xml/System.Windows.Forms/Control+ControlCollection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<param name="owner">A <see cref="T:System.Windows.Forms.Control" /> representing the control that owns the control collection.</param>
9494
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.Control.ControlCollection" /> class.</summary>
9595
<remarks>To be added.</remarks>
96+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="owner" /> argument is <see langword="null" />.</exception>
9697
<altmember cref="P:System.Windows.Forms.Control.Controls" />
9798
</Docs>
9899
</Member>

xml/System.Windows.Forms/DataGridViewComboBoxEditingControl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
126126
]]></format>
127127
</remarks>
128+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="dataGridViewCellStyle" /> argument is <see langword="null" />.</exception>
128129
<altmember cref="T:System.Windows.Forms.DataGridView" />
129130
<altmember cref="T:System.Windows.Forms.DataGridViewCellStyle" />
130131
<altmember cref="P:System.Windows.Forms.Control.Font" />

xml/System.Windows.Forms/RichTextBox.xml

Lines changed: 19 additions & 22 deletions
Large diffs are not rendered by default.

xml/System.Windows.Forms/TabControl.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,11 @@
751751
752752
]]></format>
753753
</remarks>
754-
<exception cref="T:System.ArgumentNullException">
755-
<paramref name="tabPageName" /> is <see langword="null" />.
754+
<exception cref="T:System.ArgumentNullException">The <paramref name="tabPageName" /> argument is <see langword="null" />.
756755

757756
-or-
758757

759-
<paramref name="tabPageName" /> does not match the <see cref="P:System.Windows.Forms.Control.Name" /> property of any <see cref="T:System.Windows.Forms.TabPage" /> in the <see cref="P:System.Windows.Forms.TabControl.TabPages" /> collection.</exception>
758+
The <paramref name="tabPageName" /> argument does not match the <see cref="P:System.Windows.Forms.Control.Name" /> property of any <see cref="T:System.Windows.Forms.TabPage" /> in the <see cref="P:System.Windows.Forms.TabControl.TabPages" /> collection.</exception>
760759
<altmember cref="T:System.Windows.Forms.TabPage" />
761760
<altmember cref="Overload:System.Windows.Forms.TabControl.SelectTab" />
762761
<altmember cref="P:System.Windows.Forms.TabControl.SelectedIndex" />
@@ -804,8 +803,7 @@
804803
-or-
805804

806805
<paramref name="tabPage" /> is not in the <see cref="P:System.Windows.Forms.TabControl.TabPages" /> collection.</exception>
807-
<exception cref="T:System.ArgumentNullException">
808-
<paramref name="tabPage" /> is <see langword="null" />.</exception>
806+
<exception cref="T:System.ArgumentNullException">The <paramref name="tabPage" /> argument is <see langword="null" />.</exception>
809807
<altmember cref="T:System.Windows.Forms.TabPage" />
810808
<altmember cref="Overload:System.Windows.Forms.TabControl.SelectTab" />
811809
<altmember cref="P:System.Windows.Forms.TabControl.SelectedIndex" />
@@ -1248,6 +1246,8 @@
12481246
<summary>Gets the ToolTip for the specified <see cref="T:System.Windows.Forms.TabPage" />.</summary>
12491247
<returns>The ToolTip text.</returns>
12501248
<remarks>To be added.</remarks>
1249+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="item" /> argument is <see langword="null" />.</exception>
1250+
<exception cref="T:System.ArgumentException">.NET 5.0 and later: The <paramref name="item" /> argument is not of type <see cref="T:System.Windows.Forms.TabPage" />.</exception>
12511251
</Docs>
12521252
</Member>
12531253
<Member MemberName="HotTrack">
@@ -2715,12 +2715,11 @@
27152715
27162716
]]></format>
27172717
</remarks>
2718-
<exception cref="T:System.ArgumentNullException">
2719-
<paramref name="tabPageName" /> is <see langword="null" />.
2718+
<exception cref="T:System.ArgumentNullException">The <paramref name="tabPageName" /> argument is <see langword="null" />.
27202719

27212720
-or-
27222721

2723-
<paramref name="tabPageName" /> does not match the <see cref="P:System.Windows.Forms.Control.Name" /> property of any <see cref="T:System.Windows.Forms.TabPage" /> in the <see cref="P:System.Windows.Forms.TabControl.TabPages" /> collection.</exception>
2722+
The <paramref name="tabPageName" /> argument does not match the <see cref="P:System.Windows.Forms.Control.Name" /> property of any <see cref="T:System.Windows.Forms.TabPage" /> in the <see cref="P:System.Windows.Forms.TabControl.TabPages" /> collection.</exception>
27242723
<altmember cref="T:System.Windows.Forms.TabPage" />
27252724
<altmember cref="Overload:System.Windows.Forms.TabControl.DeselectTab" />
27262725
<altmember cref="P:System.Windows.Forms.TabControl.SelectedIndex" />
@@ -2768,8 +2767,7 @@
27682767
-or-
27692768

27702769
<paramref name="tabPage" /> is not in the <see cref="P:System.Windows.Forms.TabControl.TabPages" /> collection.</exception>
2771-
<exception cref="T:System.ArgumentNullException">
2772-
<paramref name="tabPage" /> is <see langword="null" />.</exception>
2770+
<exception cref="T:System.ArgumentNullException">The <paramref name="tabPage" /> argument is <see langword="null" />.</exception>
27732771
<altmember cref="Overload:System.Windows.Forms.TabControl.DeselectTab" />
27742772
<altmember cref="T:System.Windows.Forms.TabPage" />
27752773
<altmember cref="P:System.Windows.Forms.TabControl.SelectedIndex" />

xml/System.Windows.Forms/TableLayoutControlCollection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
7575
]]></format>
7676
</remarks>
77+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="container" /> argument is <see langword="null" />.</exception>
7778
<altmember cref="P:System.Windows.Forms.TableLayoutPanel.Controls" />
7879
</Docs>
7980
</Member>

xml/System.Windows.Forms/ToolStripRenderer.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,7 @@
942942
943943
]]></format>
944944
</remarks>
945+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="e" /> argument is <see langword="null" />.</exception>
945946
<block subset="none" type="overrides">
946947
<para>When overriding <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderArrow(System.Windows.Forms.ToolStripArrowRenderEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderArrow(System.Windows.Forms.ToolStripArrowRenderEventArgs)" /> method so that registered delegates receive the event.</para>
947948
</block>
@@ -976,9 +977,7 @@
976977
## Remarks
977978
Raising an event invokes the event handler through a delegate. For more information, see [Handling and Raising Events](~/docs/standard/events/index.md).
978979
979-
The <xref:System.Windows.Forms.ToolStripRenderer.OnRenderButtonBackground%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
980-
981-
980+
The <xref:System.Windows.Forms.ToolStripRenderer.OnRenderButtonBackground%2A> method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
982981
983982
## Examples
984983
The following code example demonstrates how to override the <xref:System.Windows.Forms.ToolStripRenderer.OnRenderButtonBackground%2A> method to draw a border around a <xref:System.Windows.Forms.ToolStripButton> control's <xref:System.Windows.Forms.ToolStripItem.Image%2A>. This code example is part of a larger example provided for the <xref:System.Windows.Forms.ToolStripRenderer> class.
@@ -1179,6 +1178,7 @@
11791178
11801179
]]></format>
11811180
</remarks>
1181+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="e" /> argument is <see langword="null" />.</exception>
11821182
<block subset="none" type="overrides">
11831183
<para>When overriding <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderItemCheck(System.Windows.Forms.ToolStripItemImageRenderEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderItemCheck(System.Windows.Forms.ToolStripItemImageRenderEventArgs)" /> method so that registered delegates receive the event.</para>
11841184
</block>
@@ -1217,6 +1217,7 @@
12171217
12181218
]]></format>
12191219
</remarks>
1220+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="e" /> argument is <see langword="null" />.</exception>
12201221
<block subset="none" type="overrides">
12211222
<para>When overriding <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderItemImage(System.Windows.Forms.ToolStripItemImageRenderEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderItemImage(System.Windows.Forms.ToolStripItemImageRenderEventArgs)" /> method so that registered delegates receive the event.</para>
12221223
</block>
@@ -1255,6 +1256,7 @@
12551256
12561257
]]></format>
12571258
</remarks>
1259+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="e" /> argument is <see langword="null" />.</exception>
12581260
<block subset="none" type="overrides">
12591261
<para>When overriding <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderItemText(System.Windows.Forms.ToolStripItemTextRenderEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderItemText(System.Windows.Forms.ToolStripItemTextRenderEventArgs)" /> method so that registered delegates receive the event.</para>
12601262
</block>
@@ -1483,6 +1485,7 @@
14831485
14841486
]]></format>
14851487
</remarks>
1488+
<exception cref="T:System.ArgumentNullException">.NET 5.0 and later: The <paramref name="e" /> argument is <see langword="null" />.</exception>
14861489
<block subset="none" type="overrides">
14871490
<para>When overriding <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderStatusStripSizingGrip(System.Windows.Forms.ToolStripRenderEventArgs)" /> in a derived class, be sure to call the base class's <see cref="M:System.Windows.Forms.ToolStripRenderer.OnRenderStatusStripSizingGrip(System.Windows.Forms.ToolStripRenderEventArgs)" /> method so that registered delegates receive the event.</para>
14881491
</block>

xml/System/Uri.xml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,36 @@ Uri uri1 = new Uri("C:/test/path/file.txt") // Implicit file path.
188188
Uri uri2 = new Uri("file:///C:/test/path/file.txt") // Explicit file path.
189189
```
190190
These implicit file paths are not compliant with the URI specification and so should be avoided when possible. When using .NET Core on Unix-based systems, implicit file paths can be especially problematic, because an absolute implicit file path is *indistinguishable* from a relative path. When such ambiguity is present, <xref:System.Uri> default to interpreting the path as an absolute URI.
191+
192+
## Security Considerations
193+
194+
Because of security concerns, your application should use caution when accepting <xref:System.Uri> instances from untrusted sources and with `dontEscape` set to `true` in the [constructor](xref:System.Uri.%23ctor(System.String,System.Boolean)). You can check a URI string for validity by calling the <xref:System.Uri.IsWellFormedOriginalString%2A> method.
195+
196+
When dealing with untrusted user input, confirm assumptions about the newly created `Uri` instance before trusting its properties.
197+
This can be done in the following way:
198+
199+
```csharp
200+
string userInput = ...;
201+
202+
Uri baseUri = new Uri("https://myWebsite/files/");
203+
204+
if (!Uri.TryCreate(baseUri, userInput, out Uri newUri))
205+
{
206+
// Fail: invalid input.
207+
}
208+
209+
if (!baseUri.IsBaseOf(newUri))
210+
{
211+
// Fail: the Uri base has been modified - the created Uri is not rooted in the original directory.
212+
}
213+
```
214+
215+
This validation can be used in other cases, like when dealing with UNC paths, by simply changing the `baseUri`:
216+
217+
```csharp
218+
Uri baseUri = new Uri(@"\\host\share\some\directory\name\");
219+
```
220+
191221
192222
## Performance Considerations
193223
If you use a *Web.config *file that contains URIs to initialize your application, additional time is required to process the URIs if their scheme identifiers are nonstandard. In such a case, initialize the affected parts of your application when the URIs are needed, not at start time.
@@ -203,9 +233,6 @@ Uri uri2 = new Uri("file:///C:/test/path/file.txt") // Explicit file path.
203233
204234
]]></format>
205235
</remarks>
206-
<block subset="none" type="usage">
207-
<para>Because of security concerns, your application should use caution when accepting <see cref="T:System.Uri" /> instances from untrusted sources and with <paramref name="dontEscape" /> set to <see langword="true" />.You can check a URI string for validity by calling the <see cref="M:System.Uri.IsWellFormedOriginalString" /> method.</para>
208-
</block>
209236
<altmember cref="T:System.Configuration.IdnElement" />
210237
<altmember cref="T:System.Configuration.IriParsingElement" />
211238
<altmember cref="T:System.Configuration.UriSection" />

xml/_filter.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,14 @@
165165
<typeFilter name="DependencyInjectionSpecificationTests" expose="false" />
166166
<typeFilter name="DependencyInjectionSpecificationTests.CreateInstanceFunc" expose="false" />
167167
</namespaceFilter>
168+
<namespaceFilter name="StackExchange.Redis">
169+
<typeFitler name="*" expose="false" />
170+
</namespaceFilter>
171+
<namespaceFilter name="Polly">
172+
<typeFilter name="*" expose="false" />
173+
</namespaceFilter>
174+
<namespaceFilter name="Polly.Registry">
175+
<typeFilter name="*" expose="false" />
176+
</namespaceFilter>
168177
</apiFilter>
169178
</filter>

0 commit comments

Comments
 (0)