Git Product home page Git Product logo

Comments (4)

JumpingYang001 avatar JumpingYang001 commented on May 9, 2024

@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.

andyleejordan avatar andyleejordan commented on May 9, 2024

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.

JumpingYang001 avatar JumpingYang001 commented on May 9, 2024

Got it, thank you! looks great! I will try it.

from powershell.

JumpingYang001 avatar JumpingYang001 commented on May 9, 2024

#687 is created.

from powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.