Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass host from session if possible rather than call powershell.create() #4

Open
toenuff opened this issue Oct 28, 2015 · 3 comments
Open

Comments

@toenuff
Copy link
Owner

toenuff commented Oct 28, 2015

In the typedefinition of flancy.flancy, need to see if we can use the host's runspace rather than calling powershell.create. If I can find the variable in my session, I should be able to pass it as a part of the constructor when creating a new flancy.flancy object.

@beatcracker
Copy link
Contributor

Maybe this helps: How to get PowerShell current runspace from C#

@Jaykul
Copy link

Jaykul commented Aug 9, 2016

I have an alternative implementation of all this, which does use the existing runspace. It started as an experiment with PowerShell classes, but I found that since Nancy uses callback lamdas instead of methods, there was no way to get the runspace/threading to work.

Anyway, when I failed to get PowerShell classes to work, I had a look at flancy, but I needed to run the code in the current runspace, and so I started from clean code. It ended up very differently than flancy, so I'm not really sure the two implementations can be considered compatible ...

I've pushed it up here https://github.com/Jaykul/NancyPS so you can look at it, if you're still actively interested in this stuff. We can have a conversation about merging functionality. They're obviously similar enough that the PowerShell community doesn't really need both... but they're different enough I'm not sure how to piece them together, since it would clearly break things to merge the two.

@toenuff
Copy link
Owner Author

toenuff commented Aug 9, 2016

I'll take a peek. Honestly, I really only care about the DSL on top. I like the flancy layout/syntax. Perhaps we can add that abstraction on top of what you have. I'll take a look and we can chat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants