Interface ICodeSnippet
The system entity for code snippets which can be used to test formulas or run independantly
Inherited Members
Namespace: LemonEdge.API.Entities.Design
Assembly: LemonEdge.API.dll
Syntax
[EntityDefinition(EntityID.CodeSnippet, "dbo.LT_CodeSnippets", "CodeSnippet", LabelColumn = "Name")]
[DefaultEntityIcon(ImageType.CodeSnippet)]
public interface ICodeSnippet : IBaseEntityWithPermissions, ISetCopier, IHasVersion, IHasFolderStructure, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties
Properties
ContextType
The type of item to to use as the formula context
Declaration
[EntityProperty(SQLType.NVarChar, 2000, true)]
[EntityDescription("The type of item to to use as the formula context.")]
string ContextType { get; set; }
Property Value
Type | Description |
---|---|
string |
Description
A user friendly description of this code snippet
Declaration
[EntityProperty(SQLType.NVarChar, 2000, true)]
[EntityDescription("A user friendly description of this code snippet.")]
string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
EntityID
The id of the item to be passed into the formula context
Declaration
[EntityProperty(SQLType.UniqueIdentifier, true)]
[EntityLinkToAnyParentRelationship("EntityTypeID", SingleJoinType.ZeroToOne, "Code Snippets", false, new Type[] { typeof(IVennSetQueryableItem), typeof(ISQLTypeWrapper), typeof(IDatasetQueryableItem) }, OnlyWithLabels = true)]
[EntityDescription("The id of the item to be passed into the formula context.")]
Guid? EntityID { get; set; }
Property Value
Type | Description |
---|---|
Guid? |
EntityTypeID
The type of the item to be passed into the formula context
Declaration
[EntityProperty(SQLType.UniqueIdentifier, true, IsEntityTypeLink = true)]
[EntityDescription("The type of the item to be passed into the formula context.")]
Guid? EntityTypeID { get; set; }
Property Value
Type | Description |
---|---|
Guid? |
Name
[Key] A unique friendly name for this code snippet.
Declaration
[EntityProperty(SQLType.NVarChar, 500, false)]
[EntityKeyProperty]
[EntityDescription("The unique name of this Code Snippet.")]
[Unique]
[Required]
string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Snippet
The actual code to run
Declaration
[EntityProperty(SQLType.NVarChar, false)]
[EntityDescription("The actual code to run.")]
string Snippet { get; set; }
Property Value
Type | Description |
---|---|
string |