codeflood logo

Script Locators

Script locators are used to locate scripts the user can execute. For infomration on configuring script locators, refer to the Script Locator page.

Users can implement their own custom script locators if the OOTB locators don’t provide all necessary functionality.

Script locators muct implement the Revolver.Core.ScriptLocator.IScriptLocator, Revolver.Core interface.

The members of the interface are as follows:


string GetScript(string name)

Gets a single script by name. If multiple scripts exist by the given name the locator should throw a MultipleScriptsFoundException exception.

HelpDetails GetScriptHelp(string name)

Gets help details for a single script given by name.

IEnumerable<string> GetScriptNames()

Gets all available script names from the locator. Used by the ls-scripts command to list all available scripts in the system.

Reference

The best examples one can refer to would be the the source code for the OOTB locators which can be found on github at https://github.com/codeflood/revolver/tree/master/Revolver.Core/ScriptLocator