public void Visit(VisitPath path, object objToVisit) { if (objToVisit is not TVisitType obj) { return; } Visit(path, obj); }
private VisitPath(VisitPath previous, string propertyName, object key, object obj) { _previous = previous; _propertyName = propertyName; if (key is int index) { _index = index; } else { _key = key; } Target = obj; }
protected abstract void Visit(VisitPath path, TVisitType obj);
private VisitPath(VisitPath previous, string propertyName, object value) { _previous = previous; _propertyName = propertyName; Target = value; }