Main Class
This class is the entry point for your Code Nanite.
using System.Collections.Generic;using System.ComponentModel.Composition;using ZeraSystems.CodeStencil.Contracts;namespace ZeraSystems.CodeNanite.Schema{ [Export(typeof(ICodeStencilCodeNanite))] [CodeStencilCodeNanite(new[] { "Zera Systems Inc.", "Returns the Primary Key of the passed table", "..", "1.0", "GetPrimaryKey", "ZeraSystems.CodeNanite.Schema", "10/10/2018", "CS_PRIMARY_KEY", "1", "", "https://www.regularlabs.com/extensions/modals/features" })] public partial class GetPrimaryKey : ExpansionBase, ICodeStencilCodeNanite { public string Input { get; set; } public string Output { get; set; } public int Counter { get; set; } public List<string> OutputList { get; set; } public List<ISchemaItem> SchemaItem { get; set; } public List<IExpander> Expander { get; set; } public List<string> InputList { get ; set; } public void ExecutePlugin() { Initializer(SchemaItem, Expander); MainFunction(); } }}
Meta Data
You have the option of specifying the metadata of the class via attributes. The are 11 positions defined.
Position |
Name |
Description |
0 |
Publisher |
This is the name of the publisher |
1 |
Title |
This contains more detailed information on the Code Nanite |
2 |
Description |
This is the description of the Code Nanite |
3 |
Version Number |
This is the version number |
4 |
Label |
Label of the Code Nanite. That is also the Class name |
5 |
Namespace |
This is the namespace of the code nanite |
6 |
Release Date |
This is the release date (MM/DD/YYY) |
7 |
Expander Label |
Name to use for Expander Label |
8 |
|
Indicates that the Nanite is Schema Dependent |
9 |
RESERVED |
|
10 |
Help File URL |
This is the link to the Online help |
Properties
These properties pass and receive data between CodeStencil and your Code Nanite:
Input - This is a string passed from CodeStencil.
Output - This is the string you send back to CodeStencil.
SchemaItem - Provides access to Tables and Columns defined in Global Schema.
Counter - You can use this to increment a counter as the Code Nanite revolves back and forth between Code Stencil.
OutputList - You can send a list of strings back to CodeStencil with this property.
Expander - You can receive and update the Expanders from CodeStencil with this property.