SBS-CASE Tools allows users to extend projects using .NET Class Libraries, opening up a world of possibilities for application development. The “Invoke .NET Method” instruction allows users to create and deploy custom methods and interface with a wide variety of available resources from .NET applications and the NuGet Repository.
Invoke .NET Method SBS-CASE Tools Instruction
SBS-CASE Tools includes an instruction in the Instruction Toolbox to invoke a .NET Method (appearing as “.NET Func” in the toolbox). This instruction allows a TIP to use methods contained in external class libraries. The “Invoke .NET method” instruction requires five fields to be filled. The first requires a path to the .NET Assembly (.dll) that contains the API class. The second field requires the namespace and class name in the format “namespace.class”. The third field requires the name of the method to be invoked and does not require any arguments to be provided (as those will be provided in the next two fields). For a method defined in C# as “public static void MyMethod (string input, StringBuilder output)”, one would provide “MyMethod” in this field. The last two fields, input and output, will be the two arguments passed to the method, the first as the string parameter and the second as the StringBuilder parameter.

Creating a New Solution in Visual Studio
The TipDriverAPI class is statically defined and is implemented through the “Invoke .NET method” instruction in SBS-CASE Tools. It can be accessed through static public methods with a void return type. Class libraries created should target the .NET Framework version 3.5. The class that will be used to communicate with the TIP Driver should be statically defined. The TIP Driver can only communicate with the static class through public methods with two parameters, a string and a StringBuilder. The string parameter will be the value passed in the “Input” field in SBS-CASE Tools. The StringBuilder parameter will be the value returned to the TIP Driver and stored in the variable or structure provided in the “Output” field. Even if no input will be provided or output will be expected, public methods should include the two parameters.
To see a Sample .NET API or to download an API Template with CASE Tools project and Visual Studio project, please log in using your customer credentials and refer to “Product Downloads”.