Ansight.Tools.Reflection
0.1.0-preview.19
dotnet add package Ansight.Tools.Reflection --version 0.1.0-preview.19
NuGet\Install-Package Ansight.Tools.Reflection -Version 0.1.0-preview.19
<PackageReference Include="Ansight.Tools.Reflection" Version="0.1.0-preview.19" />
<PackageVersion Include="Ansight.Tools.Reflection" Version="0.1.0-preview.19" />
<PackageReference Include="Ansight.Tools.Reflection" />
paket add Ansight.Tools.Reflection --version 0.1.0-preview.19
#r "nuget: Ansight.Tools.Reflection, 0.1.0-preview.19"
#:package Ansight.Tools.Reflection@0.1.0-preview.19
#addin nuget:?package=Ansight.Tools.Reflection&version=0.1.0-preview.19&prerelease
#tool nuget:?package=Ansight.Tools.Reflection&version=0.1.0-preview.19&prerelease
Ansight.Tools.Reflection
Grouped live-object reflection tools for the Ansight .NET SDK.
License
The Ansight SDK is source-available software under the Ansight SDK Source-Available License. It is not open-source software. Production use is licensed only for use with Ansight Services.
Registered tools:
reflect.list_rootsreflect.inspect_objectreflect.describe_typereflect.set_member_valuereflect.invoke_method
Usage
using Ansight;
using Ansight.Tools.Reflection;
var session = new DebugSessionViewModel();
var options = Options.CreateBuilder()
.WithReflectionTools(reflection =>
{
reflection.WithDefaultMemberVisibility(ReflectionMemberVisibility.PublicOnly);
})
.WithReadWriteToolAccess()
.Build();
using var sessionRoot = ReflectionRootRegistry.Register(
"session",
session,
new ReflectionRootMetadata("Current Session")
{
Description = "Active session view model",
Hints = ["debug", "session"]
});
using var detailRoot = ReflectionRootRegistry.Register(
"details",
() => session.CurrentDetails,
new ReflectionRootMetadata("Current Details"));
detailRoot.Deregister();
Registering a root grants access to visible members and instance methods reachable from that root. The tools use stateless paths from registered roots; there are no per-member allow-list APIs in the current simplified surface. Choose the roots you expose carefully, and choose an appropriate tool guard.
Direct object roots use weak references by default when registered with Register(...). Pass ReferenceType.Strong when the registry should retain the root for the lifetime of the toolsuite. Register a Func<object?> getter when the exposed root can change over time, such as the current view model or selected document; the root is reported as unavailable while the getter returns null. Runtime registration returns a ReflectionRootRegistrationHandle; dispose it or call Deregister() to remove that specific registration, or call ReflectionRootRegistry.Deregister(id) to remove the current root by identifier. Metadata, including Description and Hints, is supplied through the ReflectionRootMetadata argument.
Recursive traversal is open by default. Use WithAssemblyTraversalMode(ReflectionAssemblyTraversalMode.AllowListedOnly) and WithNamespaceTraversalMode(ReflectionNamespaceTraversalMode.AllowListedOnly) with AllowAssembly(...) / AllowNamespacePrefix(...) only when you need to restrict expansion to selected assemblies or namespaces.
WithReadOnlyToolAccess() exposes reflect.list_roots, reflect.inspect_object, and reflect.describe_type. reflect.set_member_value and reflect.invoke_method are write-scoped and require WithReadWriteToolAccess() or a custom ToolGuard.
These tools are intended for local debugging only and may expose or mutate sensitive runtime state.
Build-time remote tool policy
Projects that reference this package are covered by AnsightRemoteToolsPolicy. The default AllowedWithWarnings policy logs detected tool type and assembly details and emits a build warning when remote tools are included. Because this package contains remote tools, Disallowed only succeeds when the package is omitted from that build, for example with Debug-only package references. Use Allowed to bypass remote tool scanning and warnings. Set AnsightLogRemoteTools=false to suppress the detected-tool list.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-android35.0 is compatible. net9.0-browser was computed. net9.0-ios was computed. net9.0-ios18.0 is compatible. net9.0-maccatalyst was computed. net9.0-maccatalyst18.0 is compatible. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Ansight.Core (>= 0.1.0-preview.19)
-
net9.0-android35.0
- Ansight.Core (>= 0.1.0-preview.19)
-
net9.0-ios18.0
- Ansight.Core (>= 0.1.0-preview.19)
-
net9.0-maccatalyst18.0
- Ansight.Core (>= 0.1.0-preview.19)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ansight.Tools.Reflection:
| Package | Downloads |
|---|---|
|
Ansight
All-in-one Ansight SDK package for .NET apps, including core runtime, pairing, and remote tools. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.19 | 41 | 5/8/2026 |
| 0.1.0-preview.18 | 46 | 5/8/2026 |
| 0.1.0-preview.17 | 37 | 5/8/2026 |
| 0.1.0-preview.16 | 44 | 5/6/2026 |
| 0.1.0-preview.15 | 42 | 5/5/2026 |
| 0.1.0-preview.14 | 51 | 5/5/2026 |
| 0.1.0-preview.13 | 45 | 5/5/2026 |
| 0.1.0-pre9 | 59 | 5/3/2026 |
| 0.1.0-pre8 | 44 | 5/3/2026 |
| 0.1.0-pre7 | 43 | 4/30/2026 |
| 0.1.0-pre6 | 40 | 4/30/2026 |
| 0.1.0-pre5 | 39 | 4/30/2026 |
| 0.1.0-pre4 | 54 | 4/27/2026 |
| 0.1.0-pre3 | 48 | 4/21/2026 |
| 0.1.0-pre2 | 79 | 4/4/2026 |
| 0.1.0-pre12 | 53 | 5/4/2026 |
| 0.1.0-pre11 | 48 | 5/4/2026 |
| 0.1.0-pre10 | 54 | 5/3/2026 |
| 0.1.0-pre1 | 70 | 3/31/2026 |