-
Notifications
You must be signed in to change notification settings - Fork 547
Update content according to latest spec #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stephentoub
merged 4 commits into
modelcontextprotocol:main
from
stephentoub:contentsupport
Jun 16, 2025
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
src/Common/Polyfills/System/Diagnostics/CodeAnalysis/StringSyntaxAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Diagnostics.CodeAnalysis; | ||
|
||
/// <summary>Specifies the syntax used in a string.</summary> | ||
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] | ||
internal sealed class StringSyntaxAttribute : Attribute | ||
{ | ||
/// <summary>Initializes the <see cref="StringSyntaxAttribute"/> with the identifier of the syntax used.</summary> | ||
/// <param name="syntax">The syntax identifier.</param> | ||
public StringSyntaxAttribute(string syntax) | ||
{ | ||
Syntax = syntax; | ||
Arguments = Array.Empty<object?>(); | ||
} | ||
|
||
/// <summary>Initializes the <see cref="StringSyntaxAttribute"/> with the identifier of the syntax used.</summary> | ||
/// <param name="syntax">The syntax identifier.</param> | ||
/// <param name="arguments">Optional arguments associated with the specific syntax employed.</param> | ||
public StringSyntaxAttribute(string syntax, params object?[] arguments) | ||
{ | ||
Syntax = syntax; | ||
Arguments = arguments; | ||
} | ||
|
||
/// <summary>Gets the identifier of the syntax used.</summary> | ||
public string Syntax { get; } | ||
|
||
/// <summary>Optional arguments associated with the specific syntax employed.</summary> | ||
public object?[] Arguments { get; } | ||
|
||
/// <summary>The syntax identifier for strings containing composite formats for string formatting.</summary> | ||
public const string CompositeFormat = nameof(CompositeFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing date format specifiers.</summary> | ||
public const string DateOnlyFormat = nameof(DateOnlyFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing date and time format specifiers.</summary> | ||
public const string DateTimeFormat = nameof(DateTimeFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing <see cref="Enum"/> format specifiers.</summary> | ||
public const string EnumFormat = nameof(EnumFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing <see cref="Guid"/> format specifiers.</summary> | ||
public const string GuidFormat = nameof(GuidFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing JavaScript Object Notation (JSON).</summary> | ||
public const string Json = nameof(Json); | ||
|
||
/// <summary>The syntax identifier for strings containing numeric format specifiers.</summary> | ||
public const string NumericFormat = nameof(NumericFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing regular expressions.</summary> | ||
public const string Regex = nameof(Regex); | ||
|
||
/// <summary>The syntax identifier for strings containing time format specifiers.</summary> | ||
public const string TimeOnlyFormat = nameof(TimeOnlyFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing <see cref="TimeSpan"/> format specifiers.</summary> | ||
public const string TimeSpanFormat = nameof(TimeSpanFormat); | ||
|
||
/// <summary>The syntax identifier for strings containing URIs.</summary> | ||
public const string Uri = nameof(Uri); | ||
|
||
/// <summary>The syntax identifier for strings containing XML.</summary> | ||
public const string Xml = nameof(Xml); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.