Add support for generic types for custom .NET actions

Hello,

It would be good to be able have a custom action in .NET in which the object is a generic one.

I have one main object that interacts with FinalBuilder, the virtual Execute() method on this class is called when invoked from FinalBuilder.

public abstract class FBAction : StandardAction { .... }

It would be good to be able to make this class generic:

public abstract class FBAction : StandardAction { ... }

This way, in FinalBuilder i will be able to simply define new .NET Actions like:

Namespace.Classname:

MyCode.FBAction

This will auto-create the underlying "worker" object as DatabaseAccessor, running the needed action.

 

 

Hi,

It should be easy to create a custom action using ActionStudio that loads an assembly and executes a particular method, here’s an example:

// Get the property values from the action
var assemblyName = GetString(“Assembly”);
var typeName = GetString(“Type”);

// Create instance of the specified type, unwrap and execute.
var instance = Activator.CreateInstance(assemblyName, typeName).Unwrap() as FBAction;
return instance.Execute();

Documentation for ActionStudio and writing actions can be found in the ActionStudio manual in the start menu.

Regards,
Paul.