Class AutoRewriter<T>
An experimental implementation of IRewriter<T> using reflection.
AutoRewriter<T> looks for the subtype's constructor, and gets/sets
the T
-children in the order that they appear in the constructor.
Inheritance
AutoRewriter<T>
Assembly: Sawmill.dll
Syntax
public class AutoRewriter<T> : IRewriter<T>
Type Parameters
Constructors
|
Improve this Doc
View Source
AutoRewriter()
Declaration
Properties
|
Improve this Doc
View Source
Instance
Declaration
public static AutoRewriter<T> Instance { get; }
Property Value
Methods
|
Improve this Doc
View Source
CountChildren(T)
Declaration
public int CountChildren(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
|
Improve this Doc
View Source
GetChildren(Span<T>, T)
Declaration
public void GetChildren(Span<T> children, T value)
Parameters
Type |
Name |
Description |
Span<T> |
children |
|
T |
value |
|
|
Improve this Doc
View Source
SetChildren(ReadOnlySpan<T>, T)
Declaration
public T SetChildren(ReadOnlySpan<T> newChildren, T oldValue)
Parameters
Type |
Name |
Description |
ReadOnlySpan<T> |
newChildren |
|
T |
oldValue |
|
Returns
Implements
Extension Methods