Class ArchiveRowTypeInfo
This class carries information about one archive entity
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoCore.dll
Syntax
public class ArchiveRowTypeInfo : ICloneable
Constructors
ArchiveRowTypeInfo()
Construct the object, setting nothing.
Declaration
public ArchiveRowTypeInfo()
ArchiveRowTypeInfo(string, string, bool)
Construct the object, setting name, display name and isOptional status
Declaration
public ArchiveRowTypeInfo(string name, string displayName, bool isOptional)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Programmatic name (it is permissible for multiple providers to offer the same entity!) |
| string | displayName | Display name to be shown to the user, can contain resource tags |
| bool | isOptional | Is this entity optional? If yes, we expect a GUI to be shown somehow, enabling the user to select it or avoid it |
ArchiveRowTypeInfo(string, string, string, bool, bool)
Construct the object, setting name, display name, isOptional status
Declaration
public ArchiveRowTypeInfo(string name, string displayName, string displayTooltip, bool isOptional, bool isDefaultShow)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Programmatic name (it is permissible for multiple providers to offer the same entity!) |
| string | displayName | Display name to be shown to the user, can contain resource tags |
| string | displayTooltip | Display tooltip to be shown to the user, can contain resource tags |
| bool | isOptional | Is this entity optional? If yes, we expect a GUI to be shown somehow, enabling the user to select it or avoid it |
| bool | isDefaultShow | Should this entity be chosen by default? If yes, we expect a GUI checkbox to be checked |
Fields
HideAsDefault
Constant, for use in constructor instead of the anonymous true/false.
Declaration
public const bool HideAsDefault = false
Field Value
| Type | Description |
|---|---|
| bool |
Mandatory
Constant value intended for the isOptional parameter of the constructor
Declaration
public const bool Mandatory = false
Field Value
| Type | Description |
|---|---|
| bool |
Optional
Constant value intended for the isOptional parameter of the constructor
Declaration
public const bool Optional = true
Field Value
| Type | Description |
|---|---|
| bool |
SetMandatory
Constant, for use in constructor instead of the anonymous true/false.
Declaration
public const bool SetMandatory = false
Field Value
| Type | Description |
|---|---|
| bool |
SetOptional
Constant, for use in constructor instead of the anonymous true/false.
Declaration
public const bool SetOptional = true
Field Value
| Type | Description |
|---|---|
| bool |
ShowAsDefault
Constant, for use in constructor instead of the anonymous true/false.
Declaration
public const bool ShowAsDefault = true
Field Value
| Type | Description |
|---|---|
| bool |
Properties
DefaultShow
Should this entity be shown as default, if it is optional (i.e., should it be selected for showing when an archive is first-ever presented to the user)
Declaration
public bool DefaultShow { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
DisplayName
The user-friendly name of the entity, to be reflected in checkboxes in the archive
Declaration
public string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DisplayTooltip
User-friendly tooltip for the entity, to be reflected in the checkboxes in the archive
Declaration
public string DisplayTooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsOptional
Can this entity be selected in the GUI (typically through a checkbox with the entity display name in the bottom of the archive). If not, the entity should ALWAYS be requested (this is the default behaviour).
Declaration
public bool IsOptional { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Unique entity identifier
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Clone()
This class carries information about one archive entity
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| object |
ToNameArray(params ArchiveRowTypeInfo[])
Utility method to convert an array of ArchiveEntityInfo into a string array containing the names only
Declaration
public static string[] ToNameArray(params ArchiveRowTypeInfo[] entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveRowTypeInfo[] | entityInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| string[] | Array of names, in original order |
ToNameArray(List<ArchiveRowTypeInfo>)
Utility method to convert a list of ArchiveEntityInfo into a string array containing the names only
Declaration
public static string[] ToNameArray(List<ArchiveRowTypeInfo> entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ArchiveRowTypeInfo> | entityInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| string[] | Array of names, in original order |
ToNameArray(Predicate<ArchiveRowTypeInfo>, params ArchiveRowTypeInfo[])
Utility method to conditionally convert an array of ArchiveEntityInfo into a string array containing the names only. The given predicate is applied to each ArchiveEntityInfo to determine if its name should be included in the result.
Declaration
public static string[] ToNameArray(Predicate<ArchiveRowTypeInfo> condition, params ArchiveRowTypeInfo[] entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| Predicate<ArchiveRowTypeInfo> | condition | Predicate that takes an ArchiveEntityInfo and returns a bool. A value of true indicates that that particular ArchiveEntityInfo should be included in the result. |
| ArchiveRowTypeInfo[] | entityInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| string[] | Array of names of column infos that were chosen, in original order |
ToNameArray(Predicate<ArchiveRowTypeInfo>, List<ArchiveRowTypeInfo>)
Utility method to conditionally convert a list of ArchiveEntityInfo into a string array containing the names only. The given predicate is applied to each ArchiveEntityInfo to determine if its name should be included in the result.
Declaration
public static string[] ToNameArray(Predicate<ArchiveRowTypeInfo> condition, List<ArchiveRowTypeInfo> entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| Predicate<ArchiveRowTypeInfo> | condition | Predicate that takes an ArchiveEntityInfo and returns a bool. A value of true indicates that that particular ArchiveEntityInfo should be included in the result. |
| List<ArchiveRowTypeInfo> | entityInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| string[] | Array of names of column infos that were chosen, in original order |
ToNameDictionary(params ArchiveRowTypeInfo[])
Utility method to convert an array of ArchiveEntityInfo into a string array containing the names only
Declaration
public static Dictionary<string, ArchiveRowTypeInfo> ToNameDictionary(params ArchiveRowTypeInfo[] entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| ArchiveRowTypeInfo[] | entityInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| Dictionary<string, ArchiveRowTypeInfo> | Array of names, in original order |
ToNameDictionary(List<ArchiveRowTypeInfo>)
Utility method to convert a list of ArchiveEntityInfo into a string array containing the names only
Declaration
public static Dictionary<string, ArchiveRowTypeInfo> ToNameDictionary(List<ArchiveRowTypeInfo> entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| List<ArchiveRowTypeInfo> | entityInfos | Column infos to extract names from |
Returns
| Type | Description |
|---|---|
| Dictionary<string, ArchiveRowTypeInfo> | Array of names, in original order |
ToNameDictionary(Predicate<ArchiveRowTypeInfo>, params ArchiveRowTypeInfo[])
Utility method to conditionally convert an array of ArchiveEntityInfo into a string array containing the names only. The given predicate is applied to each ArchiveEntityInfo to determine if its name should be included in the result.
Declaration
public static Dictionary<string, ArchiveRowTypeInfo> ToNameDictionary(Predicate<ArchiveRowTypeInfo> condition, params ArchiveRowTypeInfo[] entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| Predicate<ArchiveRowTypeInfo> | condition | Predicate that takes an ArchiveEntityInfo and returns a bool. A value of true indicates that that particular ArchiveEntityInfo should be included in the result. |
| ArchiveRowTypeInfo[] | entityInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| Dictionary<string, ArchiveRowTypeInfo> | Array of names of column infos that were chosen, in original order |
ToNameDictionary(Predicate<ArchiveRowTypeInfo>, List<ArchiveRowTypeInfo>)
Utility method to conditionally convert a list of ArchiveEntityInfo into a string array containing the names only. The given predicate is applied to each ArchiveEntityInfo to determine if its name should be included in the result.
Declaration
public static Dictionary<string, ArchiveRowTypeInfo> ToNameDictionary(Predicate<ArchiveRowTypeInfo> condition, List<ArchiveRowTypeInfo> entityInfos)
Parameters
| Type | Name | Description |
|---|---|---|
| Predicate<ArchiveRowTypeInfo> | condition | Predicate that takes an ArchiveEntityInfo and returns a bool. A value of true indicates that that particular ArchiveEntityInfo should be included in the result. |
| List<ArchiveRowTypeInfo> | entityInfos | Column infos to test and extract the name from |
Returns
| Type | Description |
|---|---|
| Dictionary<string, ArchiveRowTypeInfo> | Array of names of column infos that were chosen, in original order |
ToString()
Return a string representation, intended for debug display purposes
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |