Skip to content

Commit bd4b2ef

Browse files
Merge pull request #10466 from dotnet/main
Merge main into live
2 parents 87a0098 + 77ee1b1 commit bd4b2ef

File tree

3 files changed

+85
-47
lines changed

3 files changed

+85
-47
lines changed

.github/policies/disallow-edits.yml

Lines changed: 52 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,55 @@ description: GitOps.PullRequestIssueManagement primitive
33
resource: repository
44

55
configuration:
6-
resourceManagementConfiguration:
7-
eventResponderTasks:
8-
- description: Close PRs that modify files whose "source of truth" is not in this repo.
9-
if:
10-
- payloadType: Pull_Request
11-
- isAction:
12-
action: Opened
13-
- or:
14-
- includesModifiedFiles:
15-
files:
16-
- xml/Microsoft.Extensions*/*
17-
excludedFiles:
18-
# These files use this repo as source-of-truth.
19-
- xml/Microsoft.Extensions.FileSystemGlobbing/*
20-
- xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/*
21-
- xml/Microsoft.Extensions.FileSystemGlobbing.Internal*/*
22-
- includesModifiedFiles:
23-
files:
24-
- xml/System.Composition
25-
- includesModifiedFiles:
26-
files:
27-
- xml/System.Formats.Cbor
28-
- includesModifiedFiles:
29-
files:
30-
- xml/System.Formats.Nrbf
31-
- includesModifiedFiles:
32-
files:
33-
- xml/System.Net.ServerSentEvents
34-
- includesModifiedFiles:
35-
files:
36-
- xml/System.Numerics.Tensors
37-
- includesModifiedFiles:
38-
files:
39-
- xml/System.Speech
40-
- includesModifiedFile:
41-
file: xml/System.Runtime.Serialization/ISerializationCodeDomSurrogateProvider.xml
42-
- includesModifiedFile:
43-
file: xml/System.Runtime.Serialization/ImportOptions.xml
44-
- includesModifiedFile:
45-
file: xml/System.Runtime.Serialization/XsdDataContractExporter.xml
46-
then:
47-
- addReply:
48-
reply: >-
49-
Hello @${issueAuthor},
50-
51-
This PR will be closed because it edits files whose 'source of truth' is not in the repo.
6+
resourceManagementConfiguration:
7+
eventResponderTasks:
8+
- description: Close PRs that modify files whose "source of truth" is not in this repo.
9+
if:
10+
- payloadType: Pull_Request
11+
- isAction:
12+
action: Opened
13+
- or:
14+
- includesModifiedFiles:
15+
files:
16+
- xml/Microsoft.Extensions*/*
17+
excludedFiles:
18+
# These files use this repo as source-of-truth.
19+
- xml/Microsoft.Extensions.FileSystemGlobbing/*
20+
- xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/*
21+
- xml/Microsoft.Extensions.FileSystemGlobbing.Internal*/*
22+
- includesModifiedFiles:
23+
files:
24+
- xml/System.Composition/*
25+
- includesModifiedFiles:
26+
files:
27+
- xml/System.Formats.Cbor/*
28+
- includesModifiedFiles:
29+
files:
30+
- xml/System.Formats.Nrbf/*
31+
- includesModifiedFiles:
32+
files:
33+
- xml/System.Net.ServerSentEvents/*
34+
- includesModifiedFiles:
35+
files:
36+
- xml/System.Numerics.Tensors/*
37+
- includesModifiedFiles:
38+
files:
39+
- xml/System.Speech/*
40+
- includesModifiedFile:
41+
file: xml/System.Runtime.Serialization/ISerializationCodeDomSurrogateProvider.xml
42+
- includesModifiedFile:
43+
file: xml/System.Runtime.Serialization/ImportOptions.xml
44+
- includesModifiedFile:
45+
file: xml/System.Runtime.Serialization/XsdDataContractExporter.xml
46+
then:
47+
- addReply:
48+
reply: >-
49+
@${issueAuthor} - This PR edits files whose 'source of truth' for documentation is not in this repo. If you're editing the documentation, please make these updates in the /// comments in the source repo (either dotnet/runtime or dotnet/extensions) instead.
50+
- if:
51+
- or:
52+
- activitySenderHasPermission:
53+
permission: None
54+
- activitySenderHasPermission:
55+
permission: Read
56+
then:
57+
- closePullRequest
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on: [pull_request]
2+
3+
permissions:
4+
contents: read
5+
6+
jobs:
7+
comment:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Harden Runner
11+
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
12+
with:
13+
egress-policy: audit
14+
15+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
16+
env:
17+
SHOULD_COMMENT: ${{ github.base_ref == 'refs/heads/live' && !(github.head_ref == 'refs/heads/main') }}
18+
with:
19+
script: |
20+
if (process.env.SHOULD_COMMENT == 'true') {
21+
github.issues.createComment({
22+
issue_number: context.issue.number,
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
body: 'It looks like this pull request may have been opened on the `live` branch by mistake. In general, PRs should target the `main` branch.'
26+
})
27+
}

xml/System.Windows.Forms/Control.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8235,7 +8235,12 @@ MyControl.Font = New Font(MyControl.Font, _
82358235
> [!NOTE]
82368236
> In addition to the <xref:System.Windows.Forms.Control.InvokeRequired%2A> property, there are four methods on a control that are thread safe: <xref:System.Windows.Forms.Control.Invoke%2A>, <xref:System.Windows.Forms.Control.BeginInvoke%2A>, <xref:System.Windows.Forms.Control.EndInvoke%2A>, and <xref:System.Windows.Forms.Control.CreateGraphics%2A> if the handle for the control has already been created. Calling <xref:System.Windows.Forms.Control.CreateGraphics%2A> before the control's handle has been created on a background thread can cause illegal cross thread calls. For all other method calls, you should use one of the invoke methods to marshal the call to the control's thread.
82378237

8238-
The delegate can be an instance of <xref:System.EventHandler>, in which case the sender parameter will contain this control, and the event parameter will contain <xref:System.EventArgs.Empty?displayProperty=nameWithType>. The delegate can also be an instance of <xref:System.Windows.Forms.MethodInvoker>, or any other delegate that takes a void parameter list. A call to an <xref:System.EventHandler> or <xref:System.Windows.Forms.MethodInvoker> delegate will be faster than a call to another type of delegate.
8238+
The delegate can be an instance of <xref:System.EventHandler>, in which case the parameters will depend on the `args` value:
8239+
- If no parameters are passed, the sender parameter will contain this control and the event parameter will contain <xref:System.EventArgs.Empty?displayProperty=nameWithType>.
8240+
- When a single parameter is passed, the sender parameter will contain the first args element and the event parameter will contain <xref:System.EventArgs.Empty?displayProperty=nameWithType>.
8241+
- If more than one parameter is passed, the sender parameter will contain the first element from `args`, and the <xref:System.EventArgs> parameter will contain the second element.
8242+
8243+
A call to an <xref:System.EventHandler> or <xref:System.Windows.Forms.MethodInvoker> delegate will be faster than a call to another type of delegate.
82398244

82408245
> [!NOTE]
82418246
> An exception might be thrown if the thread that should process the message is no longer active.

0 commit comments

Comments
 (0)