Table of Contents

Interface IModelKeyPathVisitor

Namespace
MRX.UI.ErrorsAutoWiring.Abstractions
Assembly
MRX.UI.ErrorsAutoWiring.dll

Resolves a set of JSON path keys against a model, returning the field each key ultimately points at.

public interface IModelKeyPathVisitor

Methods

VisitModel(Type, object, IEnumerable<string>)

Scans model for fields referenced by keys.

Dictionary<string, FieldIdentifier> VisitModel(Type modelType, object model, IEnumerable<string> keys)

Parameters

modelType Type

The runtime type of model.

model object

The model to scan for the keys.

keys IEnumerable<string>

All field keys to scan for.

Returns

Dictionary<string, FieldIdentifier>

A dictionary linking each key to the corresponding field.

VisitModel<T>(T, IEnumerable<string>)

Scans model for fields referenced by keys.

Dictionary<string, FieldIdentifier> VisitModel<T>(T model, IEnumerable<string> keys)

Parameters

model T

The model to scan for the keys.

keys IEnumerable<string>

All field keys to scan for.

Returns

Dictionary<string, FieldIdentifier>

A dictionary linking each key to the corresponding field.

Type Parameters

T

The type of the model.