If I execute this VB expression:
New Hyperlinq("c:\temp\test.py").Dump()
as a result I get clickable link which opens the file with default application i.e. it runs this Python file.
I wanted to instruct LinqPad to custom Sub that will take care of click Event.
Hyperlinq Class contains Action
parameter, but I can't find example how to use this method:
public Hyperlinq(string uriOrPath);
public Hyperlinq(QueryLanguage queryLanguage, string query);
public Hyperlinq(Action action, string text);
public Hyperlinq(string uriOrPath, string text);
public Hyperlinq(QueryLanguage queryLanguage, string query, string text);
public Hyperlinq(Action action, string text, bool runOnNewThread);
internal Hyperlinq(int editorRow, int editorColumn, string text);
public override bool Equals(object obj);
public override int GetHashCode();
internal int RegisterAction();
Can anyone provide an example?
For example I want to open the file with Notepad when I click on the link in the result pane.
dim h = New Hyperlinq(Function() "foo".Dump, "Click me")
h.Dump
Here's the C# way to do the same thing as above
var h = new Hyperlinq(()=> {"foo".Dump();}, "Click me");
h.Dump();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With