Class ReportDetails
This class holds the details for a report. Static object locks are used throughout to ensure synchronized access.
Inheritance
Namespace: WizardWrx
Assembly: WizardWrx.Core.dll
Syntax
public class ReportDetails : List<ReportDetail>
Constructors
| Improve this Doc View SourceReportDetails()
Construct an empty list.
Declaration
public ReportDetails()
ReportDetails(ICollection<ReportDetail>)
Construct a list with an initial capacity sufficient to hold the whole ICollection, but check them in one by one.
Declaration
public ReportDetails(ICollection<ReportDetail> pICollection)
Parameters
Type | Name | Description |
---|---|---|
ICollection<ReportDetail> | pICollection | The collection from which to construct the list. Any member that is a ReportDetail is added. Others are discarded, so that the finished collection is homogeneous. |
ReportDetails(Int32)
Construct an empty list, with a specified initial capacity.
Declaration
public ReportDetails(int pintCapacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pintCapacity | Set the initial capacity of the list to this value. |
Fields
| Improve this Doc View SourceDEFAULT_DISPLAY_ORDER_INCREMENT
The default increment value is 100. With automatic incrementation, this is almost certainly overkill. On the other hand, the applications that I anticipate for this class should have plenty of headroom in the provided unsigned integer.
Declaration
public const int DEFAULT_DISPLAY_ORDER_INCREMENT = null
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceGroupDetails
Gets or sets the value (contents) of the GroupDetails array of generic object variables intended for inclusion in reports.
Declaration
public object[] GroupDetails { get; set; }
Property Value
Type | Description |
---|---|
System.Object[] |
Remarks
Use this array to store objects intended to appear in multiple lines of a report, such as a description of their source, creation date, or similar attributes that apply to the collection as a whole.
Increment
Unless the object being added has one of its own, the local Add method multiplies the count, plus 1, by this increment to set its DisplayOrder property.
Declaration
public int Increment { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
WidthOfWidestLabel
Gets the width, in characters, of the widest label.
If the class is empty, the return value is zero.
Declaration
public int WidthOfWidestLabel { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
WidthOfWidestLabelUnsigned
Gets the width, in characters, of the widest label, as an unsigned integer.
If the class is empty, the return value is zero.
Declaration
public uint WidthOfWidestLabelUnsigned { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
WidthOfWidestValue
Gets the width, in characters, of the widest value in the collection.
Declaration
public int WidthOfWidestValue { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
WidthOfWidestValueUnsigned
Gets the width, in characters, of the widest value in the collection, as an unsigned integer.
Declaration
public uint WidthOfWidestValueUnsigned { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Methods
| Improve this Doc View SourceAdd(ReportDetail)
Override the New method in the base class, because it's lots cheaper than using an event.
Declaration
public void Add(ReportDetail prDtl)
Parameters
Type | Name | Description |
---|---|---|
ReportDetail | prDtl | The ReportDetail item to add to the collection. |
ListAllItems()
List each item in a new line on the system console.
Declaration
public void ListAllItems()
ListAllItems(TextWriter)
List each item in a new line on the specified TextWriter.
Declaration
public void ListAllItems(TextWriter pswOut)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | pswOut | Specify the open TextWriter on which to write the report. |
ListAllItemsInArray()
Fill an array of strings with report items.
Declaration
public string[] ListAllItemsInArray()
Returns
Type | Description |
---|---|
System.String[] | The return value is an array of strings, one per item in the collection. Each string is a report item, ready to send to a text file or for further modification, since the lines aren't terminated. |