Class CampaignSchemaElement
Represents class for the element of the Campaign schema.
Inheritance
Inherited Members
Namespace: Terrasoft.Core.Campaign
Assembly: Terrasoft.Core.dll
Syntax
public class CampaignSchemaElement : BaseProcessSchemaElement, IMetaItem, IMetaDataSerializable, ICloneable, IFlowElementFactory, IFlowElement
Constructors
CampaignSchemaElement()
Creates a new instance.
Declaration
public CampaignSchemaElement()
CampaignSchemaElement(CampaignSchemaElement)
Creates a new instance (for clone).
Declaration
public CampaignSchemaElement(CampaignSchemaElement source)
Parameters
Type | Name | Description |
---|---|---|
CampaignSchemaElement | source | Instance of CampaignSchemaElement. |
CampaignSchemaElement(CampaignSchemaElement, Dictionary<Guid, Guid>, CampaignSchema)
Creates a new instance (for copy).
Declaration
public CampaignSchemaElement(CampaignSchemaElement source, Dictionary<Guid, Guid> dictToRebind, CampaignSchema parentSchema)
Parameters
Type | Name | Description |
---|---|---|
CampaignSchemaElement | source | Instance of CampaignSchemaElement. |
System.Collections.Generic.Dictionary<System.Guid, System.Guid> | dictToRebind | Dictionary to rebind schema elements' ids. |
CampaignSchema | parentSchema | Parent schema for current element. |
Properties
Action
Identifier of element action.
Declaration
protected virtual Guid Action { get; }
Property Value
Type | Description |
---|---|
System.Guid |
ElementType
Declaration
public virtual CampaignSchemaElementType ElementType { get; protected set; }
Property Value
Type | Description |
---|---|
CampaignSchemaElementType |
Incomings
Declaration
public FlowElementCollection Incomings { get; }
Property Value
Type | Description |
---|---|
FlowElementCollection |
IsExpanded
Sign that element is expanded.
Declaration
[MetaTypeProperty("{18F60659-D168-4ADA-815A-C768CDED4B5E}", DefValue = false)]
public virtual bool IsExpanded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Outgoings
Declaration
public FlowElementCollection Outgoings { get; }
Property Value
Type | Description |
---|---|
FlowElementCollection |
ParentSchema
Element's parent schema.
Declaration
public virtual CampaignSchema ParentSchema { get; set; }
Property Value
Type | Description |
---|---|
CampaignSchema |
ParentUId
Unique identifier of campaign item.
Declaration
public Guid ParentUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Position
Element's position on diagram.
Declaration
[MetaTypeProperty("{47042B4C-1C99-4DAD-8A02-3934C3C3E08B}")]
public virtual Point Position { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Point |
ScheduledUtcFireTime
Gets time when parent schema should be executed.
Declaration
public DateTime? ScheduledUtcFireTime { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
SessionId
Gets campaign run session identifier from parent schema.
Declaration
public Guid SessionId { get; }
Property Value
Type | Description |
---|---|
System.Guid |
Size
Element's size.
Declaration
[MetaTypeProperty("{F338CB72-0562-4185-BE1C-8DE809F85D0E}")]
public Size Size { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Size |
TypeName
Declaration
public override string TypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
ApplyMetaDataValue(DataReader)
Reads MetaData values to element properties.
Declaration
protected override void ApplyMetaDataValue(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader |
Overrides
Clone()
Creates a new instance that is a clone of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | Cloned instance of the CampaignSchemaElement type. |
Overrides
Copy(Dictionary<Guid, Guid>, CampaignSchema)
Creates a new instance that is a copy of the current instance.
Declaration
public virtual object Copy(Dictionary<Guid, Guid> dictToRebind, CampaignSchema parentSchema)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Guid, System.Guid> | dictToRebind | Dictionary to rebind schema elements' ids. |
CampaignSchema | parentSchema | Parent campaign schema. |
Returns
Type | Description |
---|---|
System.Object | Copied instance of the CampaignSchemaElement type. |
CreateFlowElement(FlowSchema)
Creates flow element.
Declaration
public override FlowElement CreateFlowElement(FlowSchema flowSchema)
Parameters
Type | Name | Description |
---|---|---|
FlowSchema | flowSchema | Instance of the FlowSchema type. |
Returns
Type | Description |
---|---|
FlowElement | Instance of the FlowElement type. |
Overrides
CreateProcessFlowElement(UserConnection)
Creates specific ProcessFlowElement instance.
Declaration
public virtual ProcessFlowElement CreateProcessFlowElement(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection |
Returns
Type | Description |
---|---|
ProcessFlowElement |
GetFireTime()
Returns null when time condition empty or System.TimeSpan fire time.
Declaration
public virtual TimeSpan? GetFireTime()
Returns
Type | Description |
---|---|
System.Nullable<System.TimeSpan> |
InitializeCampaignProcessFlowElement(CampaignProcessFlowElement)
Initializes campaign flow element properties.
Declaration
protected void InitializeCampaignProcessFlowElement(CampaignProcessFlowElement element)
Parameters
Type | Name | Description |
---|---|---|
CampaignProcessFlowElement | element |
WriteMetaData(DataWriter)
Writes meta data values.
Declaration
public override void WriteMetaData(DataWriter writer)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | Instance of the |