Skip to content

Commit 1918313

Browse files
authored
Merge branch 'main' into copilot/add-metadata-to-prompts
2 parents 3c60628 + bfc0980 commit 1918313

54 files changed

Lines changed: 191 additions & 212 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-build-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
- "*.sln"
1616
- "*.props"
1717
- "Makefile"
18+
- "global.json"
1819
- "src/**"
1920
- "tests/**"
2021
- "samples/**"
@@ -43,7 +44,7 @@ jobs:
4344
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
4445
with:
4546
dotnet-version: |
46-
10.0.x
47+
10.0.100-rc.1.25451.107
4748
9.0.x
4849
4950
# NetFX testing on non-Windows requires mono

.github/workflows/ci-code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
1616
with:
1717
dotnet-version: |
18-
10.0.x
18+
10.0.100-rc.1.25451.107
1919
9.0.x
2020
2121
- name: Download test results

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
3434
with:
3535
dotnet-version: |
36-
10.0.x
36+
10.0.100-rc.1.25451.107
3737
9.0.x
3838
3939
- name: Generate documentation

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
5454
with:
5555
dotnet-version: |
56-
10.0.x
56+
10.0.100-rc.1.25451.107
5757
9.0.x
5858
5959
- name: Build
@@ -79,7 +79,7 @@ jobs:
7979
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
8080
with:
8181
dotnet-version: |
82-
10.0.x
82+
10.0.100-rc.1.25451.107
8383
9.0.x
8484
8585
- name: Pack
@@ -108,7 +108,7 @@ jobs:
108108
- name: Setup .NET
109109
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
110110
with:
111-
dotnet-version: 10.0.x
111+
dotnet-version: 10.0.100-rc.1.25451.107
112112

113113
- name: Download build artifacts
114114
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
@@ -163,7 +163,7 @@ jobs:
163163
- name: Setup .NET
164164
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
165165
with:
166-
dotnet-version: 10.0.x
166+
dotnet-version: 10.0.100-rc.1.25451.107
167167

168168
- name: Download build artifacts
169169
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0

Directory.Packages.props

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4-
<System9Version>9.0.5</System9Version>
5-
<System10Version>10.0.0-preview.4.25258.110</System10Version>
6-
<MicrosoftExtensionsAIVersion>9.9.1</MicrosoftExtensionsAIVersion>
4+
<System9Version>9.0.10</System9Version>
5+
<System10Version>10.0.0-rc.2.25502.107</System10Version>
6+
<MicrosoftExtensionsAIVersion>9.10.0</MicrosoftExtensionsAIVersion>
77
</PropertyGroup>
88

99
<!-- Product dependencies netstandard -->
@@ -28,19 +28,17 @@
2828
<!-- Product dependencies .NET 9 -->
2929
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
3030
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(System9Version)" />
31-
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="8.9.0" />
31+
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />
3232
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(System9Version)" />
3333
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(System9Version)" />
34-
<PackageVersion Include="System.IO.Pipelines" Version="$(System9Version)" />
3534
</ItemGroup>
3635

3736
<!-- Product dependencies .NET 10 -->
3837
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
3938
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(System10Version)" />
40-
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="8.9.0" />
39+
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />
4140
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(System10Version)" />
4241
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(System10Version)" />
43-
<PackageVersion Include="System.IO.Pipelines" Version="$(System10Version)" />
4442
</ItemGroup>
4543

4644
<!-- Product dependencies shared -->
@@ -56,19 +54,19 @@
5654
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
5755

5856
<!-- Testing dependencies -->
59-
<PackageVersion Include="Anthropic.SDK" Version="5.5.1" />
57+
<PackageVersion Include="Anthropic.SDK" Version="5.6.0" />
6058
<PackageVersion Include="coverlet.collector" Version="6.0.4">
6159
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6260
<PrivateAssets>all</PrivateAssets>
6361
</PackageVersion>
6462
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
65-
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="9.9.1-preview.1.25474.6" />
63+
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="9.10.0-preview.1.25513.3" />
6664
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(System9Version)" />
6765
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(System9Version)" />
6866
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(System9Version)" />
6967
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(System9Version)" />
7068
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(System9Version)" />
71-
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.5.0" />
69+
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.10.0" />
7270
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
7371
<PackageVersion Include="Moq" Version="4.20.72" />
7472
<PackageVersion Include="OpenTelemetry" Version="1.12.0" />

docs/concepts/elicitation/samples/server/Tools/InteractiveTools.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ CancellationToken token
7373
string? playerName = nameResponse.Content?["Name"].GetString();
7474

7575
// Generate a random number between 1 and 10
76-
Random random = new Random();
76+
Random random = new();
7777
int targetNumber = random.Next(1, 11); // 1 to 10 inclusive
7878
int attempts = 0;
7979

samples/AspNetCoreMcpPerSessionTools/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{
2525
mcpOptions.Capabilities = new();
2626
mcpOptions.Capabilities.Tools = new();
27-
var toolCollection = mcpOptions.ToolCollection = new();
27+
var toolCollection = mcpOptions.ToolCollection = [];
2828

2929
foreach (var tool in tools)
3030
{

src/Common/CancellableStreamReader/CancellableStreamReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public override string ReadToEnd()
350350
CheckAsyncTaskInProgress();
351351

352352
// Call ReadBuffer, then pull data out of charBuffer.
353-
StringBuilder sb = new StringBuilder(_charLen - _charPos);
353+
StringBuilder sb = new(_charLen - _charPos);
354354
do
355355
{
356356
sb.Append(_charBuffer, _charPos, _charLen - _charPos);
@@ -953,7 +953,7 @@ public virtual Task<string> ReadToEndAsync(CancellationToken cancellationToken)
953953
private async Task<string> ReadToEndAsyncInternal(CancellationToken cancellationToken)
954954
{
955955
// Call ReadBuffer, then pull data out of charBuffer.
956-
StringBuilder sb = new StringBuilder(_charLen - _charPos);
956+
StringBuilder sb = new(_charLen - _charPos);
957957
do
958958
{
959959
int tmpCharPos = _charPos;

src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenticationOptions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public McpAuthenticationOptions()
2525
/// Gets or sets the events used to handle authentication events.
2626
/// </summary>
2727
public new McpAuthenticationEvents Events
28-
{
29-
get { return (McpAuthenticationEvents)base.Events!; }
30-
set { base.Events = value; }
28+
{
29+
get => (McpAuthenticationEvents)base.Events!;
30+
set => base.Events = value;
3131
}
3232

3333
/// <summary>

src/ModelContextProtocol.AspNetCore/AuthorizationFilterSetup.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ await FilterAuthorizedItemsAsync(
5555
});
5656
}
5757

58-
private void CheckListToolsFilter(McpServerOptions options)
58+
private static void CheckListToolsFilter(McpServerOptions options)
5959
{
6060
options.Filters.ListToolsFilters.Add(next => async (context, cancellationToken) =>
6161
{
@@ -87,7 +87,7 @@ private void ConfigureCallToolFilter(McpServerOptions options)
8787
});
8888
}
8989

90-
private void CheckCallToolFilter(McpServerOptions options)
90+
private static void CheckCallToolFilter(McpServerOptions options)
9191
{
9292
options.Filters.CallToolFilters.Add(next => async (context, cancellationToken) =>
9393
{
@@ -115,7 +115,7 @@ await FilterAuthorizedItemsAsync(
115115
});
116116
}
117117

118-
private void CheckListResourcesFilter(McpServerOptions options)
118+
private static void CheckListResourcesFilter(McpServerOptions options)
119119
{
120120
options.Filters.ListResourcesFilters.Add(next => async (context, cancellationToken) =>
121121
{
@@ -145,7 +145,7 @@ await FilterAuthorizedItemsAsync(
145145
});
146146
}
147147

148-
private void CheckListResourceTemplatesFilter(McpServerOptions options)
148+
private static void CheckListResourceTemplatesFilter(McpServerOptions options)
149149
{
150150
options.Filters.ListResourceTemplatesFilters.Add(next => async (context, cancellationToken) =>
151151
{
@@ -177,7 +177,7 @@ private void ConfigureReadResourceFilter(McpServerOptions options)
177177
});
178178
}
179179

180-
private void CheckReadResourceFilter(McpServerOptions options)
180+
private static void CheckReadResourceFilter(McpServerOptions options)
181181
{
182182
options.Filters.ReadResourceFilters.Add(next => async (context, cancellationToken) =>
183183
{
@@ -205,7 +205,7 @@ await FilterAuthorizedItemsAsync(
205205
});
206206
}
207207

208-
private void CheckListPromptsFilter(McpServerOptions options)
208+
private static void CheckListPromptsFilter(McpServerOptions options)
209209
{
210210
options.Filters.ListPromptsFilters.Add(next => async (context, cancellationToken) =>
211211
{
@@ -237,7 +237,7 @@ private void ConfigureGetPromptFilter(McpServerOptions options)
237237
});
238238
}
239239

240-
private void CheckGetPromptFilter(McpServerOptions options)
240+
private static void CheckGetPromptFilter(McpServerOptions options)
241241
{
242242
options.Filters.GetPromptFilters.Add(next => async (context, cancellationToken) =>
243243
{

0 commit comments

Comments
 (0)