Class ResultProblemCollection
Represents a collection of problems encountered during an operation.
public class ResultProblemCollection : IEnumerable<ResultProblem>, IEnumerable
- Inheritance
-
ResultProblemCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
ResultProblemCollection(params IEnumerable<ResultProblem>)
Represents a collection of problems encountered during an operation.
public ResultProblemCollection(params IEnumerable<ResultProblem> problems)
Parameters
problemsIEnumerable<ResultProblem>The problems encountered during the operation.
Methods
Append(params IEnumerable<ResultProblem>)
Appends the specified problems to the collection.
public ResultProblemCollection Append(params IEnumerable<ResultProblem> resultProblems)
Parameters
resultProblemsIEnumerable<ResultProblem>The problems to append.
Returns
- ResultProblemCollection
A new collection with the specified problems appended.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<ResultProblem> GetEnumerator()
Returns
- IEnumerator<ResultProblem>
An enumerator that can be used to iterate through the collection.
Merge(params IEnumerable<ResultProblemCollection>)
Merges multiple problem collections together into a single collection.
public static ResultProblemCollection Merge(params IEnumerable<ResultProblemCollection> problemCollections)
Parameters
problemCollectionsIEnumerable<ResultProblemCollection>The problem collections to merge.
Returns
- ResultProblemCollection
A new collection containing all problems from the specified collections.
Prepend(params IEnumerable<ResultProblem>)
Prepends the specified problems to the collection.
public ResultProblemCollection Prepend(params IEnumerable<ResultProblem> resultProblems)
Parameters
resultProblemsIEnumerable<ResultProblem>The problems to prepend.
Returns
- ResultProblemCollection
A new collection with the specified problems prepended.
Prepend(Exception, string, params object[])
Prepends a new problem from an exception to the collection using a formatted message.
public ResultProblemCollection Prepend(Exception exception, string message, params object[] args)
Parameters
exceptionExceptionThe exception causing the problem.
messagestringThe format string for the problem message.
argsobject[]The arguments to format the message.
Returns
- ResultProblemCollection
A new collection with the formatted problem prepended.
Prepend(string, params object[])
Prepends a new problem to the collection using a formatted message.
public ResultProblemCollection Prepend(string message, params object[] args)
Parameters
messagestringThe format string for the problem message.
argsobject[]The arguments to format the message.
Returns
- ResultProblemCollection
A new collection with the formatted problem prepended.