Thursday, 14 March 2013

Manually adding a code complete reference to the FLuentSharp C# REPL editor (using a 'Script the Script' editor)

Let’s say that you are in the C# REPL editor and you want to manually add a dll to be taken into account by the code complete engine (useful in the 5.1 version of the O2 Platform which had a bug that prevents some references from loading)

For example, let say you added the O2_FluentSharp_NGit.dll reference:

image

And create a new instance of the API_NGit

 image

But then, you notice that the git extension methods are missing (for example the .clone method)

image

(btw, the new 5.1 code complete filter results is quite useful in cases like this)

image

To fix this, lets get a C# REPL for the current C# REPL :)

image

which will popup up with a reference (in the script variable) to the main C# REPL object:

image

In there we can get the list of the currently loaded references:

image

or more specifically , the ones whose filenames contain the word FluentSharp

image

Next we load the missing reference:

image

Go back to the original C# REPL and confirm that it is now working:

image

Note: the screenshots have a weird top-banner color because I was running this on a Windows 8 Image