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
Tutorial.csx is somewhat obsolete with the new developments in CShell (ex. references Shell.Repl.Clear() and Mono.CSharp as the compiler etc).
It would be nice if there could be some information/examples of extension points (ex. ITool, IModule, IReplCommand, ISink). Are these for internal use only or can we extend CShell with these? I would help write it up but I dont understand them myself and struggling to see if I can extend the UI with a new ITool.
Thank you Luke for your great work on CShell!
The text was updated successfully, but these errors were encountered:
@tsebring, I agree those things need to be updated, plus a tutorial in how to write extensions is needed indeed.
But there's one big problem, the way sinks work right now is not very nice, they are not very extendable, I do want to radically rewrite how sinks are integrated into CShell and used. See #19
However, you can start hacking on extensions, I'd start with implementing a sink. Feel free to ask here if you get stuck.
I'm getting an error message when trying to call my custom sink:
"The requested sink doesnt exist ... make sure the URI is spelled correctly and the module containing the specified sink is loaded."
I've created a new binary and defined a module, sinkprovider and sink based off the XhtmlSink in CShell:
[Export(typeof (IModule))]
public class Module : ModuleBase
{ ... }
[Export(typeof(ISinkProvider))]
public class SinkProvider : ISinkProvider
{ ... }
Loading the binary in CShell and putting it in the "Modules/" folder both give the same error and the debugger wont catch any calls to the sink provider.
Am I missing something about how these extensions get loaded?
Edit.
Actually I think I figured out the problem. They binaries need to be located in the "Modules/" directory but there seem to be a small bug in the code in AppBootstrapper.Configure:
var exeDir = Assembly.GetExecutingAssembly().Location;
I believe this should be:
var exeDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Tutorial.csx is somewhat obsolete with the new developments in CShell (ex. references Shell.Repl.Clear() and Mono.CSharp as the compiler etc).
It would be nice if there could be some information/examples of extension points (ex. ITool, IModule, IReplCommand, ISink). Are these for internal use only or can we extend CShell with these? I would help write it up but I dont understand them myself and struggling to see if I can extend the UI with a new ITool.
Thank you Luke for your great work on CShell!
The text was updated successfully, but these errors were encountered: