Skip to content

Conversation

@pgovind
Copy link

@pgovind pgovind commented Aug 5, 2021

Updates RequiresPreviewFeatures attribute with an optional string message and URL

Fixes #56498

cc @jeffhandley @terrajobst

@ghost
Copy link

ghost commented Aug 5, 2021

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
Copy link

ghost commented Aug 5, 2021

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
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
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);

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks.

@pgovind
Copy link
Author

pgovind commented Aug 9, 2021

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

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

JamesNK commented Aug 9, 2021

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