Table of Contents

Class BuilderResults

Namespace
BSGameLib.UI.Builder
Assembly
BSGameLib.UI.dll

The outcome of building a view or template: what was built, and every problem found.

public class BuilderResults
Inheritance
BuilderResults
Inherited Members

Properties

Context

The context the model was validated in. Its display name prefixes each error's member name.

public ValidationContext Context { get; }

Property Value

ValidationContext

FlattenedResults

The errors with composite results expanded into one entry each, and each member name prefixed with Context's display name.

public ICollection<ValidationResult> FlattenedResults { get; }

Property Value

ICollection<ValidationResult>

IsSuccessful

Whether the model passed validation with no errors.

public bool IsSuccessful { get; }

Property Value

bool

ValidationResults

The validation errors found on the model. Empty when there were none.

public ICollection<ValidationResult> ValidationResults { get; }

Property Value

ICollection<ValidationResult>

Methods

Validate<TModel>(TModel)

Validates every property of model against its validation attributes, and returns the errors found.

public static BuilderResults Validate<TModel>(TModel model)

Parameters

model TModel

Returns

BuilderResults

Type Parameters

TModel