ExpressWalker 1.0.0.12
ExpressWalker provides a generic way to examine and change any object graph in fashion similar to "Visitor Pattern". You can build generic hierarchy composition (visitor) capable to "visit" and change any object's property, basing on configuration. Uses reflection only while building a visitor and relies purely on expression trees while visiting objects. That's why IT IS WAY FASTER than custom solutions usually built with reflection.
It is optionally protected from circular references so you can avoid StackOverflowException easily. Provides fluent API while building a visitor which increases code readability in terms of recognizing the hierarchy being built right away from the code. Some of functionalities available are visiting properties by matching owner type and name (or only type), specifying depth of visit, custom expression for changing property value, clonging etc.
//example of usage:
var visitor = TypeWalker<Parent>.Create()
.ForProperty<Parent, string>(p => p.TestString1, null, (old, met) => old + met)
.ForProperty<Child, DateTime>(p => p.TestDate1, null, (old, met) => old.AddYears(10))
.ForProperty<CommonType>(null, (old, met) => new CommonType { CommonString = "..." })
.Build();
var parentClone = new Parent();
visitor.Visit(parentObject, parentClone, 10, new InstanceGuard());
Many thanks to Francisco José Rey Gozalo for contributing with ideas and solutions.
Read more on https://github.com/kopalite/ExpressWalker
See the version list below for details.
Install-Package ExpressWalker -Version 1.0.0.12
dotnet add package ExpressWalker --version 1.0.0.12
<PackageReference Include="ExpressWalker" Version="1.0.0.12" />
paket add ExpressWalker --version 1.0.0.12
#r "nuget: ExpressWalker, 1.0.0.12"
Release Notes
Initial stable version
Dependencies
This package has no dependencies.
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
2.1.0.1 | 672 | 4/1/2018 |
1.4.0.2 | 618 | 9/10/2016 |
1.4.0.1 | 571 | 9/8/2016 |
1.3.1.3 | 570 | 9/7/2016 |
1.3.1.2 | 569 | 9/7/2016 |
1.3.0.3 | 576 | 8/17/2016 |
1.3.0.2 | 564 | 8/17/2016 |
1.3.0.1 | 590 | 8/16/2016 |
1.2.0.2 | 570 | 8/16/2016 |
1.2.0.1 | 569 | 8/9/2016 |
1.1.0.5 | 596 | 8/7/2016 |
1.1.0.4 | 550 | 8/7/2016 |
1.1.0.3 | 570 | 8/7/2016 |
1.1.0.2 | 555 | 8/7/2016 |
1.0.0.12 | 565 | 8/4/2016 |
1.0.0.10 | 587 | 8/3/2016 |
1.0.0.9 | 583 | 8/3/2016 |
1.0.0.8 | 595 | 8/3/2016 |
1.0.0.7 | 581 | 8/3/2016 |