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 sealed class AutoRewriter<T> : IRewriter<T>
Type Parameters
Properties
|
Improve this Doc
View Source
Instance
Declaration
public static AutoRewriter<T> Instance { get; }
Property Value
Methods
|
Improve this Doc
View Source
GetChildren(T)
Declaration
public Children<T> GetChildren(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
|
Improve this Doc
View Source
RewriteChildren(Func<T, T>, T)
Declaration
public T RewriteChildren(Func<T, T> transformer, T oldValue)
Parameters
Type |
Name |
Description |
Func<T, T> |
transformer |
|
T |
oldValue |
|
Returns
|
Improve this Doc
View Source
SetChildren(Children<T>, T)
Declaration
public T SetChildren(Children<T> newChildren, T oldValue)
Parameters
Type |
Name |
Description |
Children<T> |
newChildren |
|
T |
oldValue |
|
Returns
Implements
Extension Methods