What is a function?A function enables you to call and get results from external .NET code Writing external .NET functionsInvoking functions from the promptFunctions may be invoked from the prompt. If they return a non-null value, a message box is opened displaying the result. There are two ways they may be invoked:
Function configurationNameThe name is what you want to call your function. It is recommended that you give your functions meaningful names. Names can also contain namespaces. Naming rules:The first character can only be a letter or an underscore ('_').The rest of the characters can be letters, digits, or underscores ('_'). Any character between the first and the last can also be a period ('.'). Examples:DateTime.Now.ToStringEnviroment.GetMyDocumentsPath PadString AssemblyThe name of the assembly reference that points to the assembly containing the function. ClassThe fully-qualified type name (namespace + class name) of the instance class which has a parameterless constructor and contains the function. Examples:Promptu.CommonFunctionsThis.Is.My.Namespace.FunctionsClass MethodThe name of the method (function). Examples:GetMyDocumentsPathCreateDirectoryIfDoesNotExist Return
The type the function returns. It may be ParametersThis is where you configure the parameters.
|