CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Rules.BrokenRulesCollection Class Reference

A collection of currently broken rules. More...

Inheritance diagram for Csla.Rules.BrokenRulesCollection:
Csla.Core.ReadOnlyObservableBindingList< BrokenRule >

Public Member Functions

 BrokenRulesCollection ()
 Creates a read-write instance of the collection. More...
 
BrokenRule GetFirstBrokenRule (Csla.Core.IPropertyInfo property)
 Returns the first BrokenRule object corresponding to the specified property. More...
 
BrokenRule GetFirstBrokenRule (string property)
 Returns the first BrokenRule object corresponding to the specified property. More...
 
BrokenRule GetFirstMessage (Csla.Core.IPropertyInfo property)
 Returns the first BrokenRule object corresponding to the specified property. More...
 
BrokenRule GetFirstMessage (Csla.Core.IPropertyInfo property, RuleSeverity severity)
 Returns the first BrokenRule object corresponding to the specified property and severity. More...
 
BrokenRule GetFirstMessage (string property, RuleSeverity severity)
 Returns the first BrokenRule object corresponding to the specified property and severity. More...
 
override string ToString ()
 Returns the text of all broken rule descriptions, each separated by a Environment.NewLine. More...
 
string ToString (RuleSeverity severity)
 Returns the text of all broken rule descriptions for a specific severity, each separated by a Environment.NewLine. More...
 
string ToString (string separator)
 Returns the text of all broken rule descriptions. More...
 
string ToString (string separator, RuleSeverity severity)
 Returns the text of all broken rule descriptions for a specific severity. More...
 
string ToString (string separator, RuleSeverity severity, string propertyName)
 Returns the text of all broken rule descriptions for a specific severity and property. More...
 
string[] ToArray ()
 Returns a string array containing all broken rule descriptions. More...
 
string[] ToArray (RuleSeverity severity)
 Returns a string array containing all broken rule descriptions. More...
 
void AddRange (List< BrokenRule > list)
 Merges a list of items into the collection. More...
 
- Public Member Functions inherited from Csla.Core.ReadOnlyObservableBindingList< BrokenRule >
 ReadOnlyObservableBindingList ()
 Creates an instance of the type. More...
 

Protected Member Functions

override void OnGetState (SerializationInfo info)
 Override this method to insert your field values into the MobileFormatter serialzation stream. More...
 
override void OnSetState (SerializationInfo info)
 Override this method to retrieve your field values from the MobileFormatter serialzation stream. More...
 
- Protected Member Functions inherited from Csla.Core.ReadOnlyObservableBindingList< BrokenRule >
override void OnCollectionChanged (NotifyCollectionChangedEventArgs e)
 Method invoked when collection is changed. More...
 
override void SetLoadListMode (bool enabled)
 Sets the LoadListMode for the collection More...
 
override void OnGetState (Csla.Serialization.Mobile.SerializationInfo info)
 Override this method to insert your field values into the MobileFormatter serialzation stream. More...
 
override void OnSetState (Csla.Serialization.Mobile.SerializationInfo info)
 Override this method to retrieve your field values from the MobileFormatter serialzation stream. More...
 
override void OnSetChildren (Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter)
 Override this method to retrieve your child object references from the MobileFormatter serialzation stream. More...
 

Properties

int ErrorCount [get]
 Gets the number of broken rules in the collection that have a severity of Error. More...
 
int WarningCount [get]
 Gets the number of broken rules in the collection that have a severity of Warning. More...
 
int InformationCount [get]
 Gets the number of broken rules in the collection that have a severity of Information. More...
 
- Properties inherited from Csla.Core.ReadOnlyObservableBindingList< BrokenRule >
bool IsReadOnly [getprotected set]
 Gets or sets a value indicating whether the list is readonly. More...
 

Detailed Description

A collection of currently broken rules.

This collection is readonly and can be safely made available to code outside the business object such as the UI. This allows external code, such as a UI, to display the list of broken rules to the user.

Definition at line 26 of file BrokenRulesCollection.cs.

Constructor & Destructor Documentation

◆ BrokenRulesCollection()

Csla.Rules.BrokenRulesCollection.BrokenRulesCollection ( )

Creates a read-write instance of the collection.

Definition at line 39 of file BrokenRulesCollection.cs.

Member Function Documentation

◆ AddRange()

void Csla.Rules.BrokenRulesCollection.AddRange ( List< BrokenRule list)

Merges a list of items into the collection.

Parameters
listList of items to add.

Definition at line 434 of file BrokenRulesCollection.cs.

◆ GetFirstBrokenRule() [1/2]

BrokenRule Csla.Rules.BrokenRulesCollection.GetFirstBrokenRule ( Csla.Core.IPropertyInfo  property)

Returns the first BrokenRule object corresponding to the specified property.

Code in a business object or UI can also use this value to retrieve the first broken rule in BrokenRulesCollection that corresponds to a specfic property on the object.

Parameters
propertyThe property affected by the rule.
Returns
The first BrokenRule object corresponding to the specified property, or null if there are no rules defined for the property.

Definition at line 226 of file BrokenRulesCollection.cs.

◆ GetFirstBrokenRule() [2/2]

BrokenRule Csla.Rules.BrokenRulesCollection.GetFirstBrokenRule ( string  property)

Returns the first BrokenRule object corresponding to the specified property.

Code in a business object or UI can also use this value to retrieve the first broken rule in BrokenRulesCollection that corresponds to a specfic property on the object.

Parameters
propertyThe name of the property affected by the rule.
Returns
The first BrokenRule object corresponding to the specified property, or null if there are no rules defined for the property.

Definition at line 245 of file BrokenRulesCollection.cs.

◆ GetFirstMessage() [1/3]

BrokenRule Csla.Rules.BrokenRulesCollection.GetFirstMessage ( Csla.Core.IPropertyInfo  property)

Returns the first BrokenRule object corresponding to the specified property.

Code in a business object or UI can also use this value to retrieve the first broken rule in BrokenRulesCollection that corresponds to a specfic property.

Parameters
propertyThe name of the property affected by the rule.
Returns
The first BrokenRule object corresponding to the specified property, or Nothing (null in C#) if there are no rules defined for the property.

Definition at line 264 of file BrokenRulesCollection.cs.

◆ GetFirstMessage() [2/3]

BrokenRule Csla.Rules.BrokenRulesCollection.GetFirstMessage ( Csla.Core.IPropertyInfo  property,
RuleSeverity  severity 
)

Returns the first BrokenRule object corresponding to the specified property and severity.

Parameters
propertyThe property affected by the rule.
severityThe severity of broken rule to return.
Returns
The first BrokenRule object corresponding to the specified property, or Nothing (null in C#) if there are no rules defined for the property.

Definition at line 280 of file BrokenRulesCollection.cs.

◆ GetFirstMessage() [3/3]

BrokenRule Csla.Rules.BrokenRulesCollection.GetFirstMessage ( string  property,
RuleSeverity  severity 
)

Returns the first BrokenRule object corresponding to the specified property and severity.

Parameters
propertyThe name of the property affected by the rule.
severityThe severity of broken rule to return.
Returns
The first BrokenRule object corresponding to the specified property, or Nothing (null in C#) if there are no rules defined for the property.

Definition at line 296 of file BrokenRulesCollection.cs.

◆ OnGetState()

override void Csla.Rules.BrokenRulesCollection.OnGetState ( SerializationInfo  info)
protected

Override this method to insert your field values into the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.

Definition at line 447 of file BrokenRulesCollection.cs.

◆ OnSetState()

override void Csla.Rules.BrokenRulesCollection.OnSetState ( SerializationInfo  info)
protected

Override this method to retrieve your field values from the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.

Definition at line 462 of file BrokenRulesCollection.cs.

◆ ToArray() [1/2]

string[] Csla.Rules.BrokenRulesCollection.ToArray ( )

Returns a string array containing all broken rule descriptions.

Returns
The text of all broken rule descriptions matching the specified severtiy.

Definition at line 412 of file BrokenRulesCollection.cs.

◆ ToArray() [2/2]

string[] Csla.Rules.BrokenRulesCollection.ToArray ( RuleSeverity  severity)

Returns a string array containing all broken rule descriptions.

Parameters
severityThe severity of rules to include in the result.
Returns
The text of all broken rule descriptions matching the specified severtiy.

Definition at line 425 of file BrokenRulesCollection.cs.

◆ ToString() [1/5]

override string Csla.Rules.BrokenRulesCollection.ToString ( )

Returns the text of all broken rule descriptions, each separated by a Environment.NewLine.

Returns
The text of all broken rule descriptions.

Definition at line 306 of file BrokenRulesCollection.cs.

◆ ToString() [2/5]

string Csla.Rules.BrokenRulesCollection.ToString ( RuleSeverity  severity)

Returns the text of all broken rule descriptions for a specific severity, each separated by a Environment.NewLine.

Parameters
severityThe severity of rules to include in the result.
Returns
The text of all broken rule descriptions matching the specified severtiy.

Definition at line 320 of file BrokenRulesCollection.cs.

◆ ToString() [3/5]

string Csla.Rules.BrokenRulesCollection.ToString ( string  separator)

Returns the text of all broken rule descriptions.

Parameters
separatorString to place between each broken rule description.
Returns
The text of all broken rule descriptions.

Definition at line 332 of file BrokenRulesCollection.cs.

◆ ToString() [4/5]

string Csla.Rules.BrokenRulesCollection.ToString ( string  separator,
RuleSeverity  severity 
)

Returns the text of all broken rule descriptions for a specific severity.

Parameters
separatorString to place between each broken rule description.
severityThe severity of rules to include in the result.
Returns
The text of all broken rule descriptions matching the specified severtiy.

Definition at line 358 of file BrokenRulesCollection.cs.

◆ ToString() [5/5]

string Csla.Rules.BrokenRulesCollection.ToString ( string  separator,
RuleSeverity  severity,
string  propertyName 
)

Returns the text of all broken rule descriptions for a specific severity and property.

Parameters
separatorString to place between each broken rule description.
severityThe severity of rules to include in the result.
propertyNameProperty name
Returns
The text of all broken rule descriptions matching the specified severtiy.

Definition at line 388 of file BrokenRulesCollection.cs.

Property Documentation

◆ ErrorCount

int Csla.Rules.BrokenRulesCollection.ErrorCount
get

Gets the number of broken rules in the collection that have a severity of Error.

An integer value.

Definition at line 185 of file BrokenRulesCollection.cs.

◆ InformationCount

int Csla.Rules.BrokenRulesCollection.InformationCount
get

Gets the number of broken rules in the collection that have a severity of Information.

An integer value.

Definition at line 207 of file BrokenRulesCollection.cs.

◆ WarningCount

int Csla.Rules.BrokenRulesCollection.WarningCount
get

Gets the number of broken rules in the collection that have a severity of Warning.

An integer value.

Definition at line 196 of file BrokenRulesCollection.cs.