Skip to Content

Scripting Vinyl plugins using C#

Developers can create Vinyl plugins using C# scripting. C# scripts are compiled with the Roslyn .NET compiler. Each script type defines a set of global members which provide access to objects and services.

Each C# script is associated with a purpose and registered to a Table or Control. Purposes include:

  • Table default, validation and action
  • Control default and visibility
  • REST request and response transformation

Highlights of this feature include:

  • Read/write access to row
  • Read/write access to raw content of incoming/outgoing REST call
  • Access to many C# assemblies and packages that ship with Vinyl
  • Ships with your application


Scripting Resource Quick Links:

Table plugins

The following Table rules can be scripted:

Control plugins

The following Control (Panel) rules can be scripted:

REST endpoints

Plugins can be registered to REST endpoints for the purpose of transforming either:

To configure a C# plugin in Vinyl

  1. On the server where you wish to use your script, navigate to the IDE > Additional Settings, and under the Advanced Development section choose Plugins
  2. On the right hand side is the list of existing Plugins, to add a new one click + Plugin
  3. Name your Plugin and optionally give it a Description to assist users in the future
  4. Under Purpose, choose from the types listed above
  5. After saving the right hand panel will appear where you can paste in the C# code for the Plugin. Type or paste in your script, click save, and compile. The Plugin is now ready to register to an Event.