Skip to content

Update RequiresPreviewFeatures attribute - #56938

Merged
pgovind merged 5 commits into
dotnet:mainfrom
pgovind:preview
Aug 9, 2021
Merged

pgovind merged 5 commits into
dotnet:mainfrom
pgovind:preview

Conversation

@pgovind

@pgovind pgovind commented Aug 5, 2021

Copy link
Copy Markdown

Updates RequiresPreviewFeatures attribute with an optional string message and URL

Fixes #56498

cc @jeffhandley @terrajobst

@ghost

ghost commented Aug 5, 2021

Copy link
Copy Markdown

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost

ghost commented Aug 5, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

Updates RequiresPreviewFeatures attribute with an optional string message and URL

Fixes #56498

cc @jeffhandley @terrajobst

Author: pgovind
Assignees: -
Labels:

area-System.Runtime

Milestone: -

[Theory]
[InlineData(null, "")]
[InlineData("", null)]
[InlineData("message", "https://aka.ms/obsolete/{0}")]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix input string

[InlineData("message")]
public void Ctor_String_Message(string message)
{
var attribute = new RequiresPreviewFeaturesAttribute(message) {};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var attribute = new RequiresPreviewFeaturesAttribute(message) {};
var attribute = new RequiresPreviewFeaturesAttribute(message);

@stephentoub stephentoub left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@pgovind

pgovind commented Aug 9, 2021

Copy link
Copy Markdown
Author

Unrelated build failures. Merging. Thanks for the reviews!!

@pgovind
pgovind merged commit 822d877 into dotnet:main Aug 9, 2021
@JamesNK

JamesNK commented Aug 9, 2021

Copy link
Copy Markdown
Member

Hi, can the ASP.NET Core repo be updated to use the message immediately? Will it just work once the runtime changes flow into aspnetcore and aspnetcore includes a message, or does it also require other changes in VS or the compiler for the message to show up when building?

@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add description to RequiresPreviewFeaturesAttribute

4 participants