Class ArchiveRow
This class carries the data of one archive row
Assembly: SoCore.dll
Syntax
public class ArchiveRow : IDataRecord, IEquatable<ArchiveRow>
Constructors
ArchiveRow()
Construct the object, with all blank values
Declaration
ArchiveRow(ArchiveRow)
This class carries the data of one archive row
Declaration
public ArchiveRow(ArchiveRow baseRow)
Parameters
ArchiveRow(string, int)
Construct the object, setting the entity name and primary key.
Declaration
public ArchiveRow(string entityName, int primaryKey)
Parameters
Type |
Name |
Description |
string |
entityName |
|
int |
primaryKey |
|
ArchiveRow(string[], ArchiveRow)
Create an ArchiveRow that contains exactly the specified columns, populated from the
given row. Columns missing from the given row will have blank values in the result;
columns not in the completeColumnsList will not be copied
Declaration
public ArchiveRow(string[] completeColumnsList, ArchiveRow populatedPartialRow)
Parameters
Type |
Name |
Description |
string[] |
completeColumnsList |
List of column names that should be present in the new row
|
ArchiveRow |
populatedPartialRow |
Existing row object, source of data
|
Properties
ColumnData
The columns in the row, represented as name/value pairs. The value is a ArchiveColumnData object.
Declaration
public Dictionary<string, ArchiveColumnData> ColumnData { get; set; }
Property Value
FieldCount
This class carries the data of one archive row
Declaration
public int FieldCount { get; }
Property Value
this[int]
This class carries the data of one archive row
Declaration
public object this[int i] { get; }
Parameters
Type |
Name |
Description |
int |
i |
|
Property Value
this[string]
This class carries the data of one archive row
Declaration
public object this[string name] { get; }
Parameters
Type |
Name |
Description |
string |
name |
|
Property Value
LinkHint
The link hint for this row
Declaration
public string LinkHint { get; set; }
Property Value
Parents
This class carries the data of one archive row
Declaration
public List<ArchiveRowParent> Parents { get; set; }
Property Value
RowKey
The primary key of this row
Declaration
public int RowKey { get; set; }
Property Value
RowRight
Table rights for the primary table of this row. The QueryProviderBase class by default sets this to be
the TableRight of the Sentry handling the PrimaryTable of the query. Typically, buttons such as Add and Delete
in archive bottom toolbars will be controlled by this right.
Link hints on the separate cells may point to logic that makes changes (such as the toggle completed hint
on the activity archive); such hints should be individually added/removed by the provider responsible for
them based on Sentry information for that particular cell (or whatever is appropriate).
Declaration
public TableRight RowRight { get; set; }
Property Value
RowType
The entity that owns the row. Semantically this is the same as ArchiveEntityInfo.Name.
Declaration
public string RowType { get; set; }
Property Value
StyleHint
The style hint for this row
Declaration
public string StyleHint { get; set; }
Property Value
Methods
AddLinkHint(string)
Add a link hint; if a link hint already has been set, then add the new with an ampersand after the old.
Declaration
public void AddLinkHint(string linkHint)
Parameters
Type |
Name |
Description |
string |
linkHint |
link hint to be added
|
AddLinkHintToField(string, string)
This class carries the data of one archive row
Declaration
public void AddLinkHintToField(string columnName, string linkHint)
Parameters
AddOverlappingBoolColumn(string, bool)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingBoolColumn(string name, bool value)
Parameters
Returns
AddOverlappingBoolColumn(string, bool, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingBoolColumn(string name, bool value, string tooltipHint)
Parameters
Returns
AddOverlappingBoolColumn(string, bool, string, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingBoolColumn(string name, bool value, string tooltipHint, string linkHint)
Parameters
Returns
AddOverlappingColumn(string)
Add a column, overwriting an existing column of the same name with the new value;
this overload sets a null value
Declaration
public ArchiveColumnData AddOverlappingColumn(string name)
Parameters
Type |
Name |
Description |
string |
name |
Programmatic name
|
Returns
AddOverlappingColumn(string, ArchiveColumnData)
Add a column, overwriting an existing column of the same name with the new value - but only if the previous value is blank or null
Declaration
public ArchiveColumnData AddOverlappingColumn(string name, ArchiveColumnData data)
Parameters
Returns
AddOverlappingColumn(string, string)
Add a column, overwriting an existing column of the same name with the new value;
this overload takes just a string display value
Declaration
public ArchiveColumnData AddOverlappingColumn(string name, string displayValue)
Parameters
Type |
Name |
Description |
string |
name |
Programmatic name
|
string |
displayValue |
Display value, as string
|
Returns
AddOverlappingColumn(string, string, string)
Add a column, overwriting an existing column of the same name with the new value;
this overload takes a string display value and a string tooltip hint
Declaration
public ArchiveColumnData AddOverlappingColumn(string name, string displayValue, string tooltipHint)
Parameters
Type |
Name |
Description |
string |
name |
Programmatic name
|
string |
displayValue |
Display value, as string
|
string |
tooltipHint |
Tooltip hint, as string
|
Returns
AddOverlappingColumn(string, string, string, string)
Add a column, overwriting an existing column of the same name with the new value;
this overload takes a string display value and a string tooltip hint
Declaration
public ArchiveColumnData AddOverlappingColumn(string name, string displayValue, string tooltipHint, string linkHint)
Parameters
Type |
Name |
Description |
string |
name |
Programmatic name
|
string |
displayValue |
Display value, as string
|
string |
tooltipHint |
Tooltip hint, as string
|
string |
linkHint |
Link hint, as string
|
Returns
AddOverlappingDateTimeColumn(string, DateTime)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingDateTimeColumn(string name, DateTime value)
Parameters
Returns
AddOverlappingDateTimeColumn(string, DateTime, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingDateTimeColumn(string name, DateTime value, string tooltipHint)
Parameters
Returns
AddOverlappingDateTimeColumn(string, DateTime, string, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingDateTimeColumn(string name, DateTime value, string tooltipHint, string linkHint)
Parameters
Returns
AddOverlappingDoubleColumn(string, double)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingDoubleColumn(string name, double value)
Parameters
Returns
AddOverlappingDoubleColumn(string, double, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingDoubleColumn(string name, double value, string tooltipHint)
Parameters
Returns
AddOverlappingDoubleColumn(string, double, string, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingDoubleColumn(string name, double value, string tooltipHint, string linkHint)
Parameters
Returns
AddOverlappingIntColumn(string, int)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingIntColumn(string name, int value)
Parameters
Returns
AddOverlappingIntColumn(string, int, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingIntColumn(string name, int value, string tooltipHint)
Parameters
Returns
AddOverlappingIntColumn(string, int, string, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingIntColumn(string name, int value, string tooltipHint, string linkHint)
Parameters
Returns
AddOverlappingTimeSpanColumn(string, TimeSpan, string, string)
This class carries the data of one archive row
Declaration
public ArchiveColumnData AddOverlappingTimeSpanColumn(string name, TimeSpan value, string tooltipHint = "", string linkHint = "")
Parameters
Returns
AddParent(string, int)
This class carries the data of one archive row
Declaration
public void AddParent(string tableName, int primaryKey)
Parameters
Type |
Name |
Description |
string |
tableName |
|
int |
primaryKey |
|
AddStyleHint(string)
Add a style hint; if a style hint already has been set, then add the new with an ampersand after the old.
Always make sure the style hints are in alphabetical order; a predictable order is needed to be sure we can correctly
match combinations in the style sheet.
Declaration
public void AddStyleHint(string styleHint)
Parameters
Type |
Name |
Description |
string |
styleHint |
Style hint to be added
|
Add a tooltip to a field in an archive row. The tooltip can be a literal and/or a {} style hint. It will
be added to the given column if that column either lacks a tooltip or has one of the same type. If the
column is missing, nothing bad happens. The added tooltip may be null or empty, causing nothing to happen.
Declaration
public void AddTooltipToField(string columnName, string tooltip)
Parameters
Type |
Name |
Description |
string |
columnName |
Name of column to add a tooltip to
|
string |
tooltip |
tooltip to add, may be null, empty, literal or a hint
|
AlignToTargetColumnSet(string[])
Align the content of this ArchiveRow with the given list of columns. Surplus columns are removed,
while missing columns are added with null data.
Declaration
public void AlignToTargetColumnSet(string[] completeColumnsList)
Parameters
Type |
Name |
Description |
string[] |
completeColumnsList |
List of columns the row is to contain
|
Clone()
This class carries the data of one archive row
Declaration
public ArchiveRow Clone()
Returns
Equals(ArchiveRow)
Checks if two archive rows are the same row. This will only do a simple check on row type and row key, as doing
extensive checks on all the data contained within the row would be too expensive, performance-wise.
Declaration
public bool Equals(ArchiveRow other)
Parameters
Returns
Type |
Description |
bool |
True if input is not null and matches row type and key, false if not.
|
GetBoolean(int)
This class carries the data of one archive row
Declaration
public bool GetBoolean(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetByte(int)
This class carries the data of one archive row
Declaration
public byte GetByte(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetBytes(int, long, byte[], int, int)
This class carries the data of one archive row
Declaration
public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
Parameters
Type |
Name |
Description |
int |
i |
|
long |
fieldOffset |
|
byte[] |
buffer |
|
int |
bufferoffset |
|
int |
length |
|
Returns
GetChar(int)
This class carries the data of one archive row
Declaration
public char GetChar(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetChars(int, long, char[], int, int)
This class carries the data of one archive row
Declaration
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
Parameters
Type |
Name |
Description |
int |
i |
|
long |
fieldoffset |
|
char[] |
buffer |
|
int |
bufferoffset |
|
int |
length |
|
Returns
GetData(int)
This class carries the data of one archive row
Declaration
public IDataReader GetData(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetDataTypeName(int)
This class carries the data of one archive row
Declaration
public string GetDataTypeName(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetDateTime(int)
This class carries the data of one archive row
Declaration
public DateTime GetDateTime(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetDecimal(int)
This class carries the data of one archive row
Declaration
public decimal GetDecimal(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetDisplayValue(string)
Get the display value for a given column ID. If the column does not
exist, an empty string (not null) is returned
Declaration
public string GetDisplayValue(string columnName)
Parameters
Type |
Name |
Description |
string |
columnName |
Column name, case-sensitive and must include any prefixes
|
Returns
Type |
Description |
string |
Display value if found, or an empty string
|
GetDouble(int)
This class carries the data of one archive row
Declaration
public double GetDouble(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetFieldType(int)
This class carries the data of one archive row
Declaration
public Type GetFieldType(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetFloat(int)
This class carries the data of one archive row
Declaration
public float GetFloat(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetGuid(int)
This class carries the data of one archive row
Declaration
public Guid GetGuid(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetInt16(int)
This class carries the data of one archive row
Declaration
public short GetInt16(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetInt32(int)
This class carries the data of one archive row
Declaration
public int GetInt32(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetInt64(int)
This class carries the data of one archive row
Declaration
public long GetInt64(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetLinkHintValue(string)
Return a link hint by name
Declaration
public string GetLinkHintValue(string hintName)
Parameters
Type |
Name |
Description |
string |
hintName |
|
Returns
GetName(int)
This class carries the data of one archive row
Declaration
public string GetName(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetOrdinal(string)
This class carries the data of one archive row
Declaration
public int GetOrdinal(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetString(int)
This class carries the data of one archive row
Declaration
public string GetString(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetValue(int)
This class carries the data of one archive row
Declaration
public object GetValue(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
GetValues(object[])
This class carries the data of one archive row
Declaration
public int GetValues(object[] values)
Parameters
Type |
Name |
Description |
object[] |
values |
|
Returns
HasLinkHint(string)
Check if link hint exists
Declaration
public bool HasLinkHint(string hintName)
Parameters
Type |
Name |
Description |
string |
hintName |
|
Returns
IsDBNull(int)
This class carries the data of one archive row
Declaration
public bool IsDBNull(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
PopulateFromBase(ArchiveRow, bool)
This class carries the data of one archive row
Declaration
public void PopulateFromBase(ArchiveRow baseRow, bool includeData)
Parameters
RemoveLinkHint(string)
Remove occurances of key from the linkHint.
Declaration
public void RemoveLinkHint(string key)
Parameters
Type |
Name |
Description |
string |
key |
The key to remove
|
RemoveStyleHint(string)
Remove a style hint if it was present, otherwise do nothing
Declaration
public void RemoveStyleHint(string removeHint)
Parameters
Type |
Name |
Description |
string |
removeHint |
Hint to remove
|
ReplaceLinkHint(string, string)
This class carries the data of one archive row
Declaration
public void ReplaceLinkHint(string linkKey, string linkValue)
Parameters
ToIdDictionary(ArchiveRow[])
Create a lookup dictionary of rows, based on their primary key. Note that there is no built-in guarantee that an arbitrary
collection/array of rows will have unique primary keys; if there are multiple entities then each one might have its
own key range.
Declaration
public static Dictionary<int, ArchiveRow> ToIdDictionary(ArchiveRow[] rows)
Parameters
Type |
Name |
Description |
ArchiveRow[] |
rows |
Rows to be converted to a dictionary
|
Returns
ToIdDictionary(ICollection<ArchiveRow>)
Create a lookup dictionary of rows, based on their primary key. Note that there is no built-in guarantee that an arbitrary
collection/array of rows will have unique primary keys; if there are multiple entities then each one might have its
own key range.
Declaration
public static Dictionary<int, ArchiveRow> ToIdDictionary(ICollection<ArchiveRow> rows)
Parameters
Returns
ToString()
Returns a string representation of the values of this row, intended for debug display purposes (this is not
a complete serialization)
Declaration
public override string ToString()
Returns
Overrides
Implements
Extension Methods