Anatomy of a C# Module

Action naming field: The name of the data source appears in the top-left corner. You can update the name using the pencil icon next to it. You can use English characters as well as the special characters “-” or “_” in the name.

Template area: You can switch between predefined templates using the drop-down list in the top-right corner:

  • Default C# Function
  • Custom Authentication Provider
  • Custom Authorization Provider
  • Custom Verification Code Sender Provider
  • Custom Connection String Provider
  • Custom External Token Validator Provider
  • Custom Mail Provider
When you change the template, the code in the editor is replaced with the code for the template you selected. Any code you wrote previously is deleted.

Editor toolbar: Includes options for undo/redo, copy/paste, code formatting (Tidy Up), line wrapping, and font size adjustment. On the right side, a checkmark indicating whether the code is valid and the cursor’s position (e.g., “Ln 18, Col 1”) are displayed.

Tidy Up: You can automatically align and format your code by clicking the formatting button on the toolbar. This improves the code’s readability.

External Libraries (BETA): You can add the NuGet packages you want to use in your action from this section. Clicking the button opens a two-tabbed panel:

  • Installed: Lists the libraries added to the data source. If no libraries have been added yet, you can navigate to the package registry using the Browse registry button.
  • Browse: Lists the libraries in the package registry. You can search using the Search packages field, view the current version of each package, and add the package using the Add button. For example, popular libraries such as Newtonsoft.Json, System.Text.Json, and Serilog are supported.

The libraries you add become available for use in your C# code. Paying attention to library versions is important for compatibility.

Kuika AI: You can create functions with AI support from the panel on the right side of the editor. (See Section 3)

Test Console: You can test your function by expanding the TEST CONSOLE area below the editor.

Saving Functions: After creating functions, you can save them by clicking the CREATE button in the top-right corner.

Creating C# Functions with Kuika AI

  1. In the Type here field at the bottom of the Kuika AI panel on the right side of the editor, define the function you want to create (for example, “Hello world rotating function”).
  2. Click the Submit button.
  3. Copy the code generated by Kuika AI and paste it into your C# editor.