Comments (4)
@andschwa SessionStateInternal is a internal class, how can I use it in xUnit? use Reflection? I don't know which public class has this member, cloud you give me some suggestion to do this task? thank you!
from powershell.
In C#, there's a piece of magic that can make one assemblies internals available to another. It is this [assembly:InternalsVisibleTo("powershell-tests")]
code.
This should make the internal class visible within the xUnit tests.
As an example, we use it here.
Here is the definition of SessionStateInternal
.
Navigating the PowerShell codebase is... an experience. I highly recommend setting up tags. I personally use GNU Global with ggtags in Emacs. In Vim, Exuberant Ctags is great (it can be used with Emacs too with a little digger). Until tags are setup, the quickest way to find things is to grep
or ag
the source in psl-monad/monad/src/engine/
, and if it's not in engine
, go up a directory.
from powershell.
Got it, thank you! looks great! I will try it.
from powershell.
#687 is created.
from powershell.
Related Issues (20)
- SDK: Closing a Runspace does not clean up resources HOT 7
- For native commands, variables are not expanded if argument begins with `-` (`-key=$var`, `-D$var`) HOT 9
- I don't understand. The existing logic is to not allow this method to be called multiple times from native code. HOT 2
- Why the command winget search Microsoft.PowerShell can not get the latest version(7.4.2) of powershell? HOT 3
- PowerShell installer wipes and replaces shortcut even if nothing was changed in the executable path name or arguments HOT 2
- GDPR consent problem: PowerShell 7.4.2 installer forcefully enables telemetry on upgrade even if previous version was installed with telemetry disabled HOT 1
- `ConciseView` error view mangles `ParseException` child classes with custom message HOT 4
- Can not upgrade via `winget upgrade` HOT 6
- Test-Json has false positives when using anyof and allof statements in JSON schema HOT 2
- Inside a class method, the PowerShell parser cannot detect that a variable that is declared and assigned in all branches of a switch statement has actually been assigned a value HOT 3
- [System.Convert]::FromBase64String causes memory leak with large strings HOT 58
- serious security bug - auto completion reveals password HOT 9
- https://aka.ms/pwsh-buildinfo-lts points to the wrong release HOT 1
- Clearing gateway using powershell WMI does not function as expected
- Support ASKPASS for credential prompt HOT 3
- How can I disable PSAMSIMethodInvocationLogging HOT 8
- AMSI logging implemented on Linux HOT 8
- Debian/Ubuntu at packages.microsoft.com not updated for 7.4.2 release HOT 3
- Feedback providers should export a VT escape sequence for other Terminals HOT 3
- An incidentally `[psobject]`-wrapped strongly typed array isn't recognized as such in argument-based parameter binding HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powershell.