Click or drag to resize
ErrorContainer Class
Simple class which is used as a container for error information for IDataErrorInfo implementations.
Inheritance Hierarchy
SystemObject
  SD.Tools.Algorithmia.GeneralDataStructuresErrorContainer

Namespace:  SD.Tools.Algorithmia.GeneralDataStructures
Assembly:  SD.Tools.Algorithmia (in SD.Tools.Algorithmia.dll) Version: 1.3.0.0 (1.3.17.0314)
Syntax
public class ErrorContainer : IDataErrorInfo

The ErrorContainer type exposes the following members.

Constructors
  NameDescription
Public methodErrorContainer
Initializes a new instance of the ErrorContainer class.
Top
Properties
  NameDescription
Public propertyError
Gets an error message indicating what is wrong with this object.
Public propertyItem
Gets the String with the specified column name.
Public propertySyncRoot
Gets an object that can be used to synchronize access to the ICollection. It's the same object used in locks inside this object.
Top
Methods
  NameDescription
Public methodAppendPropertyError(String, String)
Appends the property error to an existing error for that property. Appends a newline first.
Public methodAppendPropertyError(String, String, Boolean)
Appends the property error to an existing error for that property. Appends a newline first.
Public methodAppendPropertyError(String, String, String)
Appends the property error to an existing error for that property. Appends the lineSeparator to the existing error first.
Public methodAppendPropertyError(String, String, String, Boolean)
Appends the property error to an existing error for that property. Appends the lineSeparator to the existing error first.
Public methodClearErrors
Clears the errors contained in this container
Public methodConvertToNewLineDelimitedList
Converts all property-error pairs to a new-line delimited string .
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAllPropertyNamesWithErrors
Gets all property names with errors stored in this errorcontainer. Use the names to index into this container to obtain the error for this particular property. Properties with an empty string as error are ignored.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetPropertyError(String, String)
Sets the property error. If an empty errorDescription is passed in, the error information is cleared. Always logs a hard error.
Public methodSetPropertyError(String, String, Boolean)
Sets the property error. If an empty errorDescription is passed in, the error information is cleared.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
Instead of doing housekeeping of error info in every class which implements IDataErrorInfo, you can use an instance of this class to do it for you. Simply set the errors in this class and retrieve the error info in the IDataErrorInfo implementation of your own class.

This class is thread safe.
See Also