You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Overhaul member binding
With this change comes the ability to access non-public members without
having to output them first. This allows you to use any non-public member
like they've always been public as long as ImpliedReflection is enabled.
This is done by replacing the delegate used by the engine to retrieve
CLR members with a custom delegate that includes non-public members.
For non-public static members, it's still required to output either
an instance of the type or the System.Type object that represents it.
Some additional changes:
- Non-public constructors can now be accessed via an additional static
method named "ctor"
- Significantly increased performance
- Now uses dynamically compiled delegates for all reflection calls
- Module is now a compiled binary module
- Caches retrieved member data
* Various fixes
- Fix member binding of non-public types in PowerShell Core
- Fix binding of non-public constructors for non-public types
- Fix binding of non-public constructors when the type already has a
method named "ctor"
- Fix binding of non-public constructors when parameters contain a
type that cannot be used for a generic type instantiation
* Fix exception when member is write only
* Update README
Copy file name to clipboardExpand all lines: README.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,32 @@ By participating, you are expected to uphold this code. Please report unacceptab
9
9
10
10
- All members are bound to the object the **same way public members are** by the PowerShell engine.
11
11
- Supports any parameter types (including ByRef, Pointer, etc) that the PowerShell engine can handle.
12
-
- Members are **bound automatically** when output to the console.
13
-
- Supports non-public static members with `[type]::Member` syntax.
12
+
- Member binding is done automatically by hooking into the PowerShell engine's binder.
13
+
14
+
## Known Issues
15
+
16
+
- Non-public static members will only be available once either:
17
+
1. A `System.Type` object representing the type has been outputted
18
+
1. An instance of the type has been outputted
19
+
There's only an instance delegate in the engine, so static still depends on `Out-Default`
20
+
21
+
- Non-public constructors are available via an added `_ctor` static method
22
+
23
+
- Family (aka `protected`) properties will throw an exception stating that the property is
24
+
write only. This is due to explicit checks for family properties in the PowerShell's binder. You can
25
+
get around it by calling the getter method instead (e.g. instead of `$Host.Runspace.RunningPipelines` try `$Host.Runpsace.get_RunningPipelines()`)
14
26
15
27
## Documentation
16
28
17
29
Check out our **[documentation](https://github.com/SeeminglyScience/ImpliedReflection/tree/master/docs/en-US/ImpliedReflection.md)** for information about how to use this project.
0 commit comments