Node Params - GhostLabsAB/Examples GitHub Wiki

Node params contains all the parameters that the adapter need to have to be able to run as expected. Examples of parameters could be a connection string, a path, a threshold value.

# Node Param Attributes

Every property included must have some attributes defined because they are used for auto-generating documentation/help for the adapter.

Mandatory Attributes

  • DisplayName
A readable string of the property which can contain spaces.
  • Description
A description of the property.
  • Category
Specifies the name of the category in which to group the property when displayed in Ghost Studio.
  • DefaultValue
The default value of the property used when auto generating documentation.

Optional Attributes

  • IsNodeKey
Set this attribute on every property that combined will generate a unique id for every message.
  • IsRefreshable
Set to true on properties that can be updated in runtime without restarting the process.
  • AcceptDefaultValue
Tells the configuration if the default value is acceptable or needs to be changed before deploying.
  • EditorAttribute
Add a property editor for a complex property.
  • TypeConverter
Add a type converter for specified editor.
  • SampleValues
A list of sample values that will be used when auto generating documentation.
  • PropertyOrder
Set this attribute with ascending values to sort properties. If not specified properties will be sorted by its name.
  • MaxStringLength
Sets a max length of a string.
  • ObscureText
This will obscure a text field hiding its characters. Should be used on password fields.
  • Multiline
This attribute will enable multi line text fields. Visible lines can be between 1 and 10.
  • OtherPropertyEnabled, OtherPropertyDisabled
A list of other properties that will be enabled/disabled when this property changes value. 
Properties of type:
    'bool' will validate as is.
    'string' will fail to validate on empty or null strings.
All other types have to set the SuccessValue which determinates validation.
  • OtherPropertyVisibility
A list of other properties that will be shown/hidden when this property changes value.
Properties of type:
    'bool' will validate as is.
    'string' will fail to validate on empty or null strings.
All other types have to set the SuccessValue which determinates validation.
  • OtherPropertyUnckeck
A list of properties that will be checked/unchecked depending in this property value.
  • MinIntValue
Only applies to โ€˜intโ€™ properties.
  • MaxIntValue
Only applies to โ€˜intโ€™ properties.

Example of a Property

[IsNodeKey(true)]
[IsRefreshable(true)]
[DisplayName("Path")]
[Description("Path to a local folder or a network share where files will be read from.")]
[Category("Mandatory"), DefaultValue(""), AcceptDefaultValue(false)]
[EditorAttribute("GhostNodes.Win.AdapterUIEditors.UIEditors.FolderBrowserUITypeEditor", "System.Drawing.Design.UITypeEditor")]
[TypeConverter("GhostNodes.Win.AdapterUIEditors.UIEditors.FolderBrowserTypeConverter")]
[SampleValues(@"C:\Local\Folder", @"X:\Mapped\Folder", @"\\Server\Shared\Folder")]
[PropertyOrder(10)]
public string Path { get; set; }

List of available custom editors

  • FolderBrowser Dialog
[Editor("GhostNodes.Win.AdapterUIEditors.UIEditors.FolderBrowserUITypeEditor", "System.Drawing.Design.UITypeEditor")]
[TypeConverter("GhostNodes.Win.AdapterUIEditors.UIEditors.FolderBrowserTypeConverter")]
  • DateTime DropDown
[Editor("GhostNodes.Win.AdapterUIEditors.UIEditors.DateTimeUITypeEditor", "System.Drawing.Design.UITypeEditor")]
  • StringDictionary DropDown
[Editor("GhostNodes.Win.AdapterUIEditors.UIEditors.StringDictionaryUITypeEditor", "System.Drawing.Design.UITypeEditor")]
[TypeConverter("GhostNodes.Win.AdapterUIEditors.UIEditors.StringDictionaryConverter")]
  • TextEncoding DropDown
[Editor("GhostNodes.Win.AdapterUIEditors.UIEditors.TextEncodingUITypeEditor", "System.Drawing.Design.UITypeEditor")]
  • CodeEditor Dialog
[Editor("GhostNodes.Win.AdapterUIEditors.UIEditors.CodeEditor.CodeEditorUITypeEditor", "System.Drawing.Design.UITypeEditor")]
[TypeConverter("GhostNodes.Win.AdapterUIEditors.UIEditors.CodeEditor.CodeEditorTypeConverter")]