Skip to content

Commit e0445d5

Browse files
Update README
1 parent fc12896 commit e0445d5

File tree

1 file changed

+51
-103
lines changed

1 file changed

+51
-103
lines changed

README.md

Lines changed: 51 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -42,141 +42,89 @@ Check out our **[documentation](https://github.com/SeeminglyScience/ClassExplore
4242
Install-Module ClassExplorer -Scope CurrentUser
4343
```
4444

45+
### PowerShellGet v3
46+
47+
```powershell
48+
Install-PSResource ClassExplorer
49+
```
50+
4551
### Source
4652

4753
```powershell
4854
git clone 'https://github.com/SeeminglyScience/ClassExplorer.git'
4955
Set-Location ./ClassExplorer
50-
Install-Module platyPS, Pester, InvokeBuild -Force
51-
Import-Module platyPS, Pester, InvokeBuild
52-
Invoke-Build -Task Install
56+
./build.ps1
5357
```
5458

5559
## Usage
5660

5761
### Find an accessible version of an abstract type
5862

5963
```powershell
60-
$type = Find-Type RunspaceConnectionInfo
61-
$type
62-
63-
# IsPublic IsSerial Name BaseType
64-
# -------- -------- ---- --------
65-
# True False RunspaceConnectionInfo System.Object
66-
67-
$children = Find-Type -InheritsType $type
68-
$children
69-
70-
# IsPublic IsSerial Name BaseType
71-
# -------- -------- ---- --------
72-
# True False WSManConnectionInfo System.Management.Automation.Runspac...
73-
# True False NamedPipeConnectionInfo System.Management.Automation.Runspac...
74-
# True False SSHConnectionInfo System.Management.Automation.Runspac...
75-
# True False VMConnectionInfo System.Management.Automation.Runspac...
76-
# True False ContainerConnectionInfo System.Management.Automation.Runspac...
77-
78-
$accessible = $children | Find-Type { $_ | Find-Member -MemberType Constructor }
79-
$accessible
80-
81-
# IsPublic IsSerial Name BaseType
82-
# -------- -------- ---- --------
83-
# True False WSManConnectionInfo System.Management.Automation.Runspac...
84-
# True False NamedPipeConnectionInfo System.Management.Automation.Runspac...
85-
# True False SSHConnectionInfo System.Management.Automation.Runspac...
86-
87-
$accessible[1] | Find-Member -MemberType Constructor | Get-Parameter
88-
89-
# Member: Void .ctor(Int32)
90-
#
91-
# # ParameterType Name IsIn IsOut IsOpt
92-
# - ------------- ---- ---- ----- -----
93-
# 0 Int32 processId False False False
94-
#
95-
# Member: Void .ctor(Int32, System.String)
96-
#
97-
# # ParameterType Name IsIn IsOut IsOpt
98-
# - ------------- ---- ---- ----- -----
99-
# 0 Int32 processId False False False
100-
# 1 String appDomainName False False False
101-
#
102-
# Member: Void .ctor(Int32, System.String, Int32)
103-
#
104-
# # ParameterType Name IsIn IsOut IsOpt
105-
# - ------------- ---- ---- ----- -----
106-
# 0 Int32 processId False False False
107-
# 1 String appDomainName False False False
108-
# 2 Int32 openTimeout False False False
64+
Find-Type RunspaceConnectionInfo
65+
```
66+
67+
![Example-1-Results-1](https://user-images.githubusercontent.com/24977523/164984679-8a32dc97-e2a2-46ff-9d4f-e322b866c061.png)
68+
69+
```powershell
70+
Find-Type -InheritsType System.Management.Automation.Runspaces.RunspaceConnectionInfo
71+
```
72+
73+
![Example-1-Results-2](https://user-images.githubusercontent.com/24977523/164984851-1a20380d-452f-463f-b21c-2931f9ea852f.png)
74+
75+
```powershell
76+
Find-Type -InheritsType System.Management.Automation.Runspaces.RunspaceConnectionInfo |
77+
Find-Type { $_ | Find-Member -MemberType Constructor }
78+
```
79+
80+
![Example-1-Results-3](https://user-images.githubusercontent.com/24977523/164984898-0f5ca28f-a462-45c0-a4f9-1b60f95b7a86.png)
81+
82+
```powershell
83+
[Management.Automation.Runspaces.NamedPipeConnectionInfo] |
84+
Find-Member -MemberType Constructor |
85+
Get-Parameter
86+
```
87+
88+
![Example-1-Results-4](https://user-images.githubusercontent.com/24977523/164985845-4e7830ff-8507-46dd-b3a5-908aaa38a135.png)
10989

90+
```powershell
11091
# Or, alternatively this will return all constructors, properties, methods, etc that return any
11192
# implementation of RunspaceConnectionInfo.
11293
Find-Member -ReturnType System.Management.Automation.Runspaces.RunspaceConnectionInfo
113-
11494
```
11595

96+
![Example-1-Results-5](https://user-images.githubusercontent.com/24977523/164985973-4c011ee8-6107-4126-9984-ffa595b0ad58.png)
97+
11698
### Find something to do with a type
11799

118100
```powershell
119101
using namespace System.Management.Automation.Runspaces
120102
121103
Find-Member -ParameterType RunspaceConnectionInfo -ReturnType RunspacePool
104+
```
105+
106+
![Example-2-Results](https://user-images.githubusercontent.com/24977523/164986057-ca7cfba9-182b-4c99-8dd2-a33941922b54.png)
107+
108+
### Use type signature queries
109+
110+
See [about_Type_Signatures.help.md](./docs/en-US/about_Type_Signatures.help.md)
122111

123-
# ReflectedType: RunspaceFactory
124-
#
125-
# Name MemberType Definition
126-
# ---- ---------- ----------
127-
# CreateRunspacePool Method public static RunspacePool CreateRunspacePool(int minRunspaces…
128-
# CreateRunspacePool Method public static RunspacePool CreateRunspacePool(int minRunspaces…
129-
# CreateRunspacePool Method public static RunspacePool CreateRunspacePool(int minRunspaces…
130-
# CreateRunspacePool Method public static RunspacePool CreateRunspacePool(int minRunspaces…
131-
#
132-
# ReflectedType: RunspacePool
133-
#
134-
# Name MemberType Definition
135-
# ---- ---------- ----------
136-
# GetRunspacePools Method public static RunspacePool[] GetRunspacePools(RunspaceConnecti…
137-
# GetRunspacePools Method public static RunspacePool[] GetRunspacePools(RunspaceConnecti…
138-
# GetRunspacePools Method public static RunspacePool[] GetRunspacePools(RunspaceConnecti…
112+
```powershell
113+
Find-Member -ReturnType { [ReadOnlySpan[byte]] } -ParameterType { [ReadOnlySpan[any]] }
139114
```
140115

116+
![Example-3-Results](https://user-images.githubusercontent.com/24977523/164994773-84f42529-9a8d-46e8-8982-f42f054c2a80.png)
117+
141118
### Get real specific
142119

143120
```powershell
144-
$findMemberSplat = @{
145-
MemberType = 'Method'
146-
RegularExpression = $true
147-
Name = '^(?!Should(Continue|Process))'
148-
ReturnType = [bool]
149-
ParameterType = [string]
150-
Instance = $true
151-
}
152-
153-
Find-Member @findMemberSplat -FilterScript {
154-
$parameters = $_ | Get-Parameter
155-
$parameters.ParameterType.IsByRef -contains $true -and
156-
$parameters.Count -gt 3
157-
}
158-
159-
# ReflectedType: System.ComponentModel.MaskedTextProvider
160-
#
161-
# Name MemberType IsStatic Definition
162-
# ---- ---------- -------- ----------
163-
# InsertAt Method False Boolean InsertAt(String input, Int32 position, Int32...
164-
# Replace Method False Boolean Replace(String input, Int32 position, Int32&...
165-
# Replace Method False Boolean Replace(String input, Int32 startPosition, I...
166-
#
167-
# ReflectedType: System.Web.Util.RequestValidator
168-
#
169-
# Name MemberType IsStatic Definition
170-
# ---- ---------- -------- ----------
171-
# InvokeIsValidRequ... Method False Boolean InvokeIsValidRequestString(HttpContext conte...
172-
#
173-
# ReflectedType: System.Activities.XamlIntegration.ICompiledExpressionRoot
174-
#
175-
# Name MemberType IsStatic Definition
176-
# ---- ---------- -------- ----------
177-
# CanExecuteExpression Method False Boolean CanExecuteExpression(String expressionText, ...
121+
Find-Member -MemberType Method -Instance -ParameterType string -ReturnType bool -ParameterCount 4.. |
122+
Find-Member -ParameterType { [anyref] [any] } |
123+
Find-Member -Not -RegularExpression 'Should(Continue|Process)'
178124
```
179125

126+
![Example-4-Results](https://user-images.githubusercontent.com/24977523/164995061-21e0c627-fd05-43d4-b831-f901bfc31fd2.png)
127+
180128
## Contributions Welcome!
181129

182130
We would love to incorporate community contributions into this project. If you would like to

0 commit comments

Comments
 (0)