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

Port .NET 7.0 Preview1 documentation #7807

Merged
merged 38 commits into from
Mar 12, 2022
Merged

Conversation

carlossanlop
Copy link
Member

This PR contains all the documentation added in .NET 7 Preview1. The changes on each namespace were added in separate commits to make it easier to review.

Area owners, please help review the documentation got ported properly, has no typos, no unexpected xml elements or markdown items. If you find any problems, it would be extremely appreciated if you provide a comment with a code suggestion for easier fixing.

Need review from:

@dotnet/area-extensions-caching
@dotnet/area-extensions-configuration
@dotnet/area-extensions-dependencyinjection
@dotnet/area-extensions-primitives
@dotnet/area-system-buffers
@dotnet/area-system-collections
@dotnet/area-system-diagnostics-activity
@dotnet/area-system-diagnostics-eventlog
@dotnet/area-system-diagnostics-performancecounter
@dotnet/area-system-diagnostics-tracesource
@dotnet/area-system-drawing
@dotnet/area-system-io
@dotnet/ncl
@dotnet/area-system-numerics (also please take a look at some changes in the System commit)
@dotnet/area-system-reflection-metadata
@dotnet/area-system-reflection (for System.Reflection.PortableExecutable)
@dotnet/area-system-runtime-compilerservices
@dotnet/area-system-runtime-compilerservices
@dotnet/area-system-runtime-intrinsics
@dotnet/area-system-security
@dotnet/area-system-text-json
@dotnet/area-system-text-regularexpressions
@dotnet/area-system-text-encoding
@kouvel for System.Threading
@dotnet/area-system-threading-tasks
@Rick-Anderson for System.Web
@RussKie for System.Windows.Forms
@dotnet/area-system-runtime for System

@opbld33

This comment was marked as outdated.

@opbld30

This comment was marked as outdated.

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@opbld32

This comment was marked as outdated.

@@ -1406,6 +1406,8 @@ This member is an explicit interface member implementation. It can be used only
<exception cref="T:System.InvalidOperationException">The underlying collection was modified outside of this <see cref="T:System.Collections.Concurrent.BlockingCollection`1" /> instance, or the <see cref="T:System.Collections.Concurrent.BlockingCollection`1" /> is empty and the collection has been marked as complete for adding.</exception>
<related type="Article" href="/dotnet/standard/collections/thread-safe/">Thread-Safe Collections</related>
<related type="Article" href="/dotnet/standard/collections/thread-safe/blockingcollection-overview">BlockingCollection Overview</related>
<exception cref="T:System.OperationCanceledException">The <see cref="T:System.Collections.Concurrent.BlockingCollection`1" /> is empty and has been marked
as complete with regards to additions.</exception>
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right. The docs correctly cite this same condition just a few lines above as being for an InvalidOperationException. It's possible the docs were correctly updated and the source just never was? (I'm looking forward to a time when these are maintained in only one place.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I see what you mean. This is the text we have in triple slash:

        /// <exception cref="System.OperationCanceledException">The <see
        /// cref="System.Collections.Concurrent.BlockingCollection{T}"/> is empty and has been marked
        /// as complete with regards to additions.</exception>
        /// <exception cref="System.ObjectDisposedException">The <see
        /// cref="System.Collections.Concurrent.BlockingCollection{T}"/> has been disposed.</exception>
        /// <exception cref="System.InvalidOperationException">The underlying collection was modified
        /// outside of this <see
        /// cref="System.Collections.Concurrent.BlockingCollection{T}"/> instance.</exception>

Should I revert this added exception? I am not convinced this API throws OperationCanceledException anywhere. If yes, then I think the triple slash exceptions should be updated as well.

Copy link
Member

Choose a reason for hiding this comment

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

Should I revert this added exception?

Yes, please.

If yes, then I think the triple slash exceptions should be updated as well.

Yes, the /// comments are incorrect. Not just on this overload but on others as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems this is the only location that needs fixing in this PR. There's only one other Take overload, which takes a CancellationToken argument, and it can throw OperationCanceledException when it internally calls TryTakeWithNoTimeValidation. It throws here and here.

Copy link
Member

Choose a reason for hiding this comment

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

and it can throw OperationCanceledException when it internally calls TryTakeWithNoTimeValidation. It throws here and here.

Yes, but the docs on that overload are wrong:
https://github.com/dotnet/runtime/blame/60f593b4dc3760268956b9a874daad7f49b0255d/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs#L546-L549
It can throw an OperationCanceledException, but not because the collection "is empty and has been marked as complete with regards to additions."

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened issue to track the triple slash removal: dotnet/runtime#66374

@opbld30

This comment was marked as outdated.

@opbld30

This comment was marked as outdated.

@opbld30
Copy link

opbld30 commented Mar 9, 2022

Docs Build status updates of commit 7aa55da:

✅ Validation status: passed

File Status Preview URL Details
xml/Microsoft.Extensions.Primitives/StringSegment.xml 💡Suggestion View Details
xml/System.Security.Cryptography/ECAlgorithm.xml 💡Suggestion View Details
xml/Microsoft.Extensions.Caching.Memory/MemoryCache.xml ✅Succeeded View
xml/Microsoft.Extensions.Caching.Memory/MemoryCacheOptions.xml ✅Succeeded View
xml/Microsoft.Extensions.Configuration/ConfigurationDebugViewContext.xml ✅Succeeded View
xml/Microsoft.Extensions.Configuration/ConfigurationRootExtensions.xml ✅Succeeded View
xml/Microsoft.Extensions.DependencyModel/Dependency.xml ✅Succeeded View
xml/System.Buffers/SequenceReader`1.xml ✅Succeeded View
xml/System.Collections.Generic/CollectionExtensions.xml ✅Succeeded View
xml/System.Diagnostics.CodeAnalysis/ConstantExpectedAttribute.xml ✅Succeeded View
xml/System.Diagnostics.CodeAnalysis/RequiresDynamicCodeAttribute.xml ✅Succeeded View
xml/System.Diagnostics.CodeAnalysis/StringSyntaxAttribute.xml ✅Succeeded View
xml/System.Diagnostics/Activity.xml ✅Succeeded View
xml/System.Diagnostics/ActivityContext.xml ✅Succeeded View
xml/System.Drawing/Graphics.xml ✅Succeeded View
xml/System.IO/RandomAccess.xml ✅Succeeded View
xml/System.Net.Http.Json/HttpClientJsonExtensions.xml ✅Succeeded View
xml/System.Net.Sockets/Socket.xml ✅Succeeded View
xml/System.Numerics/BitOperations.xml ✅Succeeded View
xml/System.Numerics/Quaternion.xml ✅Succeeded View
xml/System.Numerics/Vector.xml ✅Succeeded View
xml/System.Reflection.Metadata.Ecma335/ControlFlowBuilder.xml ✅Succeeded View
xml/System.Reflection.PortableExecutable/Machine.xml ✅Succeeded View
xml/System.Runtime.CompilerServices/DisableRuntimeMarshallingAttribute.xml ✅Succeeded View
xml/System.Runtime.CompilerServices/RuntimeHelpers.xml ✅Succeeded View
xml/System.Runtime.CompilerServices/Unsafe.xml ✅Succeeded View
xml/System.Runtime.InteropServices/NFloat.xml ✅Succeeded View
xml/System.Runtime.Intrinsics.Arm/ArmBase.xml ✅Succeeded View
xml/System.Runtime.Intrinsics.X86/X86Base.xml ✅Succeeded View
xml/System.Runtime.Intrinsics/Vector128.xml ✅Succeeded View
xml/System.Runtime.Intrinsics/Vector128`1.xml ✅Succeeded View
xml/System.Runtime.Intrinsics/Vector256.xml ✅Succeeded View
xml/System.Runtime.Intrinsics/Vector256`1.xml ✅Succeeded View
xml/System.Runtime.Intrinsics/Vector64.xml ✅Succeeded View
xml/System.Runtime.Intrinsics/Vector64`1.xml ✅Succeeded View
xml/System.Security.Cryptography.Pkcs/CmsSigner.xml ✅Succeeded View
xml/System.Security.Cryptography.X509Certificates/X509Certificate2.xml ✅Succeeded View
xml/System.Security.Cryptography.X509Certificates/X509Certificate2Collection.xml ✅Succeeded View
xml/System.Security.Cryptography/AsymmetricAlgorithm.xml ✅Succeeded View
xml/System.Security.Cryptography/HMACMD5.xml ✅Succeeded View
xml/System.Security.Cryptography/HMACSHA1.xml ✅Succeeded View
xml/System.Security.Cryptography/HMACSHA256.xml ✅Succeeded View
xml/System.Security.Cryptography/HMACSHA384.xml ✅Succeeded View
xml/System.Security.Cryptography/HMACSHA512.xml ✅Succeeded View
xml/System.Security.Cryptography/MD5.xml ✅Succeeded View
xml/System.Security.Cryptography/RSA.xml ✅Succeeded View
xml/System.Security.Cryptography/SHA1.xml ✅Succeeded View
xml/System.Security.Cryptography/SHA256.xml ✅Succeeded View
xml/System.Security.Cryptography/SHA384.xml ✅Succeeded View
xml/System.Security.Cryptography/SHA512.xml ✅Succeeded View

This comment lists only the first 50 files in the pull request.

xml/Microsoft.Extensions.Primitives/StringSegment.xml

  • Line 0, Column 0: [Suggestion: ECMA2Yaml_Inheritdoc_NoFoundParent] Found no member can be inherited by key:Equals(System.Object) for uid: Microsoft.Extensions.Primitives.StringSegment.Equals(System.Object).

xml/System.Security.Cryptography/ECAlgorithm.xml

  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'list' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'item' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'description' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'item' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'description' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'item' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 0, Column 0: [Suggestion: disallowed-html-tag - See documentation] HTML tag 'description' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

System.IO and Microsoft.Extensions.Caching.Memory LGTM, thank you @carlossanlop !

@carlossanlop carlossanlop merged commit dd42f68 into dotnet:main Mar 12, 2022
@carlossanlop carlossanlop deleted the Preview1 branch March 12, 2022 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta Concerns something that extends across runtime area boundaries, for example, IDisposable.
Projects
None yet
Development

Successfully merging this pull request may close these issues.