Table of Contents

Class CombineErrorExtensions

Namespace
Trellis
Assembly
Trellis.Core.dll

Combines two Error values into one. Two Error.UnprocessableContent values merge their field/rule violations. Otherwise the two errors are flattened into an Error.Aggregate.

public static class CombineErrorExtensions
Inheritance
CombineErrorExtensions
Inherited Members

Methods

Combine(Error?, Error)

Combines two errors. If both are Error.UnprocessableContent, their Fields and Rules sequences are concatenated. Otherwise the two errors are flattened into an Error.Aggregate (any nested Error.Aggregate values are flattened by the constructor).

public static Error Combine(this Error? thisError, Error otherError)

Parameters

thisError Error

The first error, or null.

otherError Error

The second error.

Returns

Error

The combined error.

Exceptions

ArgumentNullException

otherError is null.