Skip to content

Commit

Permalink
fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren committed Mar 28, 2024
1 parent 2cceed2 commit de10e06
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 100 deletions.
4 changes: 4 additions & 0 deletions .openpublishing.redirection.framework.json
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,10 @@
"source_path_from_root": "/docs/framework/reflection-and-codedom/how-to-define-a-generic-type-with-reflection-emit.md",
"redirect_url": "/dotnet/fundamentals/reflection/how-to-define-a-generic-type-with-reflection-emit"
},
{
"source_path_from_root": "/docs/framework/reflection-and-codedom/how-to-define-and-execute-dynamic-methods.md",
"redirect_url": "/dotnet/fundamentals/reflection/how-to-define-and-execute-dynamic-methods"
},
{
"source_path_from_root": "/docs/framework/reflection-and-codedom/how-to-examine-and-instantiate-generic-types-with-reflection.md",
"redirect_url": "/dotnet/fundamentals/reflection/how-to-examine-and-instantiate-generic-types-with-reflection"
Expand Down
2 changes: 1 addition & 1 deletion docs/core/porting/net-framework-tech-unavailable.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Windows Workflow Foundation (WF) is not supported in .NET 6+. For an alternative
- <xref:System.Reflection.Emit.AssemblyBuilderAccess.RunAndSave>
- <xref:System.Reflection.Emit.AssemblyBuilderAccess.Save>

In .NET 9, a persisted `AssemblyBuilder` was implemented and the <xref:System.Reflection.Emit.AssemblyBuilder.Save%2A?displayProperty=nameWithType> method was added back to the reflection emit library. To learn more about how to use this API, see [System.Reflection.Emit.AssemblyBuilder class](../../fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder.md#persistable-dynamic-assemblies-in-net-core).
In .NET 9, a persisted `AssemblyBuilder` was implemented and the <xref:System.Reflection.Emit.AssemblyBuilder.Save%2A?displayProperty=nameWithType> method was added back to the reflection emit library. To learn more about how to use this API, see [System.Reflection.Emit.AssemblyBuilder class](../../fundamentals/runtime-libraries/system-reflection-emit-assemblybuilder.md#persistable-dynamic-assemblies-in-net).

For more information, see [dotnet/runtime issue 15704](https://github.com/dotnet/runtime/issues/15704).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ The object:
area = 36.57
```

## Compiling the Code

- This code example requires the `FullTrust` permission set to execute successfully.

## See also

- [Using the CodeDOM](using-the-codedom.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ The code example creates the following XML documentation in the *HelloWorldDoc.x
</doc>
```

## Compile permissions

This code example requires the `FullTrust` permission set to execute successfully.

## See also

- [Document your code with XML (Visual Basic)](../../visual-basic/programming-guide/program-structure/documenting-your-code-with-xml.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/reflection-and-codedom/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ items:
- name: Reflection
items:
- name: Overview
href: ../fundamentals/reflection/reflection.md?toc=/dotnet/framework/toc.json&bc=/dotnet/breadcrumb/toc.json
href: ../../fundamentals/reflection/reflection.md?toc=/dotnet/framework/toc.json&bc=/dotnet/breadcrumb/toc.json
- name: Security Considerations for Reflection
href: security-considerations-for-reflection.md
- name: "How to: Load Assemblies into the Reflection-Only Context"
Expand All @@ -12,7 +12,7 @@ items:
- name: Emit dynamic methods and assemblies
items:
- name: Overview
href: /dotnet/fundamentals/reflection/emitting-dynamic-methods-and-assemblies?toc=/dotnet/framework/toc.json&bc=/dotnet/breadcrumb/toc.json
href: ../../fundamentals/reflection/emitting-dynamic-methods-and-assemblies?toc=/dotnet/framework/toc.json&bc=/dotnet/breadcrumb/toc.json
- name: Security Issues in Reflection Emit
href: security-issues-in-reflection-emit.md
- name: "Walkthrough: Emitting Code in Partial Trust Scenarios"
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/reflection/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ms.assetid: d1a58e7f-fb39-4d50-bf84-e3b8f9bf9775

The classes in the <xref:System.Reflection> namespace, together with <xref:System.Type?displayProperty=nameWithType>, enable you to obtain information about loaded [assemblies](../../standard/assembly/index.md) and the types defined within them, such as [classes](../../standard/base-types/common-type-system.md#classes), [interfaces](../../standard/base-types/common-type-system.md#interfaces), and value types (that is, [structures](../../standard/base-types/common-type-system.md#structures) and [enumerations](../../standard/base-types/common-type-system.md#enumerations)). You can also use reflection to create type instances at run time, and to invoke and access them.

[Assemblies](../../standard/assemblies/index.md) contain modules, modules contain types, and types contain members. Reflection provides objects that encapsulate assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object. You can then invoke the type's methods or access its fields and properties. Typical uses of reflection include the following:
[Assemblies](../../standard/assembly/index.md) contain modules, modules contain types, and types contain members. Reflection provides objects that encapsulate assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object. You can then invoke the type's methods or access its fields and properties. Typical uses of reflection include the following:

- Use <xref:System.Reflection.Assembly> to define and load assemblies, load modules that are listed in the assembly manifest, and locate a type from this assembly and create an instance of it.
- Use <xref:System.Reflection.Module> to discover information such as the assembly that contains the module and the classes in the module. You can also get all global methods or other specific, non-global methods defined on the module.
Expand Down
2 changes: 0 additions & 2 deletions docs/fundamentals/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1436,8 +1436,6 @@ items:
items:
- name: Examine and instantiate generic types with reflection
href: reflection/how-to-examine-and-instantiate-generic-types-with-reflection.md
- name: Load assemblies into the reflection-only context
href: reflection/how-to-load-assemblies-into-the-reflection-only-context.md
- name: Get type and member information by using reflection
href: reflection/get-type-member-information.md
- name: Hook up a delegate using reflection
Expand Down
Loading

0 comments on commit de10e06

Please sign in to comment.