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
modelTypeTypeThe runtime type of
model.modelobjectThe model to scan for the keys.
keysIEnumerable<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
modelTThe model to scan for the keys.
keysIEnumerable<string>All field keys to scan for.
Returns
- Dictionary<string, FieldIdentifier>
A dictionary linking each key to the corresponding field.
Type Parameters
TThe type of the model.