Show / Hide Table of Contents

Class TagContainer

Base class for classes exposing template tags.

Inheritance
Object
TagContainer
AppointmentVariables
ContactTags
FadTags
FadTemplateVariables
PersonVariables
ProjectTags
SystemTags
TemplateVariables
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.IO
Assembly: SoCore.dll
Syntax
public abstract class TagContainer

Constructors

TagContainer()

Declaration
protected TagContainer()

Fields

_bInitiated

State about the object has been initiated.
Data (e.g. AddData(Object[])) can only be added before initiation. Call base.Init() to set this value to true.

Declaration
protected bool _bInitiated
Field Value
Type Description
Boolean

Properties

CurrentUiCulture

Current UI culture, this is currently the language code used in template processing

Declaration
public string CurrentUiCulture { get; set; }
Property Value
Type Description
String

Data

Retrieve data that can be used when

Declaration
protected object[] Data { get; }
Property Value
Type Description
Object[]

Id

Primary key of the

Declaration
public abstract int Id { get; }
Property Value
Type Description
Int32

Methods

AddData(Object[])

Add data to be used when retrieving template variables. Use when you have (possibly unsaved) Entity objects that you wish to pass in.

Declaration
public virtual void AddData(params object[] data)
Parameters
Type Name Description
Object[] data

Data to be used when retrieving template variables. For instance, Entity objects

Exceptions
Type Condition
SoIllegalOperationException

Thrown if data is added after it has been used (e.g. through GetValue(String)).

ClearData()

Clear cached data

Declaration
public void ClearData()

GetData()

Get cached data objects

Declaration
public virtual object[] GetData()
Returns
Type Description
Object[]

Array with all cached data objects

GetValue(String)

Get a value for a tag.

Declaration
public virtual string GetValue(string tag)
Parameters
Type Name Description
String tag

Name of the tag.

Returns
Type Description
String

Value of the tag. An empty string (e.g. Empty) is returned if there is no valid value.

Init()

Set the object in an initaited state. This means that no data can be added (e.g. AddData(Object[])) beyound this point.

Declaration
protected virtual void Init()

IsTagInContext(String)

Is this a valid tag in the given context. If there are no current sale, there are no valid tags for sale.

Declaration
public virtual bool IsTagInContext(string tag)
Parameters
Type Name Description
String tag

theName of the tag.

Returns
Type Description
Boolean

True if tag is valid in hte given context.

IsTagLegal(String)

Is this a legal tag?

Declaration
public virtual bool IsTagLegal(string tag)
Parameters
Type Name Description
String tag

Name of the tag.

Returns
Type Description
Boolean

True is returned if this is a legal tag.

RemoveCustomValue(String)

Remove an existing custom tag

Declaration
public void RemoveCustomValue(string tag)
Parameters
Type Name Description
String tag

SetValue(String, String)

Add a custom tag/value pair

Declaration
public void SetValue(string tag, string value)
Parameters
Type Name Description
String tag

Name of the tag

String value

Value of the tag

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top