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

Update Activator.xml #9409

Merged
merged 4 commits into from
Oct 26, 2023
Merged

Update Activator.xml #9409

merged 4 commits into from
Oct 26, 2023

Conversation

colejohnson66
Copy link
Contributor

Summary

Document (in the "returns" section) when Activator.CreateInstance can return null. This information is currently documented in the remarks, but, as remarks are placed below exceptions and examples, it's easy to miss.

Fixes #9407

Question

Should the note of null returns be removed from the remarks area?

@colejohnson66 colejohnson66 requested a review from a team as a code owner October 26, 2023 12:36
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 26, 2023
@learn-build-service-prod
Copy link

Learn Build status updates of commit 6412b81:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details
xml/System/Activator.xml ❌Error Details

  • Line 0, Column 0: [Error: ECMA2Yaml_File_LoadFailed] Failed to load 1 files, aborting...

xml/System/Activator.xml

  • Line 0, Column 0: [Error: ECMA2Yaml_InternalError]
Intenal Several Error: System.Xml.XmlException: The '%' character, hexadecimal value 0x25, cannot be included in a name. Line 404, position 111.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ParseElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
   at ECMA2Yaml.ECMALoader.LoadType(FileItem typeFile)
   at ECMA2Yaml.ECMALoader.LoadTypes(String basePath, Namespace ns)

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Use `T:` prefix for type refs
@learn-build-service-prod

This comment was marked as outdated.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 556b30a:

✅ Validation status: passed

File Status Preview URL Details
xml/System/Activator.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren
Copy link
Contributor

Thanks @colejohnson66. Yes, can you remove it from the remarks. Also, it looks like there are a couple more overloads that should be updated with this return type.

Update remaining method return notes and remove remarks about null.
@learn-build-service-prod
Copy link

Learn Build status updates of commit 04b71c6:

✅ Validation status: passed

File Status Preview URL Details
xml/System/Activator.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Thanks!

@gewarren gewarren merged commit a7fad6a into dotnet:main Oct 26, 2023
2 checks passed
@colejohnson66 colejohnson66 deleted the patch-2 branch October 26, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activator.CreateInstance does not document null returns
2 participants