Skip to content
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

Use file-scoped namespaces everywhere in samples #3708

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

roji
Copy link
Member

@roji roji commented Jan 31, 2022

Done automatically with Rider (and manually removed changes to migration files).

Note that if we have any code snippets in the conceptual pages which don't reference a region, this would break them (since line numbers will now shift). However, we almost always use regions which wouldn't be affected (since line numbers are relative).

@roji roji requested a review from a team January 31, 2022 09:20
@ErikEJ
Copy link
Contributor

ErikEJ commented Jan 31, 2022

Also simple to do automatically with Visual Studio 😉

@ajcvickers
Copy link
Member

@roji Do we want to do this? Generally, we want code copied from samples to be usable by people who might not be running the latest of everything.

@roji
Copy link
Member Author

roji commented Jan 31, 2022

I'm thinking that at least EF Core 6.0 users have to use the latest SDK anyway, so they'd have to be manually restricting the language version to pre-10 for this to fail... Am doing some ASP.NET minimal API samples where it would be a shame to have to namespace etc.

But am OK if you prefer we didn't do this.

Copy link
Member

@ajcvickers ajcvickers left a comment

Choose a reason for hiding this comment

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

Ah 🐑 🇮🇹
🐑 🇮🇹 good
🐑 🇮🇹 real good

@roji roji merged commit 12c2a44 into dotnet:main Mar 2, 2022
@roji roji deleted the FileScopedNamespaces branch March 2, 2022 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants