Newbe.ObjectVisitor
0.3.7
See the version list below for details.
dotnet add package Newbe.ObjectVisitor --version 0.3.7
NuGet\Install-Package Newbe.ObjectVisitor -Version 0.3.7
<PackageReference Include="Newbe.ObjectVisitor" Version="0.3.7" />
paket add Newbe.ObjectVisitor --version 0.3.7
#r "nuget: Newbe.ObjectVisitor, 0.3.7"
// Install Newbe.ObjectVisitor as a Cake Addin #addin nuget:?package=Newbe.ObjectVisitor&version=0.3.7 // Install Newbe.ObjectVisitor as a Cake Tool #tool nuget:?package=Newbe.ObjectVisitor&version=0.3.7
You can visit all properties about your class or struct by this lib with high performance as you visit properties in hard coding way.
For example, here is object in your code.
```cs
var order = new OrderInfo();
```
And, you want to print all properties of the order.
```cs
for(var pInfo in typeof(OrderInfo).GetProperties())
{
Console.Writeline($"{pInfo.Name}: {pInfo.GetValue(order)}");
}
```
By using this lib, you can handle it in this way:
```cs
// call .V what is a static extension method
// you get a visitor object for order
var visitor = order.V();
visitor.ForEach(context=>{
var name = context.Name;
var value = context.Value;
Console.Writeline($"{name}: {value}");
}).Run();
// you can also make it into one line
order.V().ForEach(c=> Console.Writeline($"{c.Name}: {c.Value}")).Run();
// or using quick style
order.FormatToString();
```
Why do I need this?
- It is faster. This lib is impletmented with [Expression Trees](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/expression-trees/) that cost 1/10 time as in Reflection way.
- It is readable. This lib can generate a lambda func to handle the code flow you create that just as your hard coding without reflection.
- It is extendable. If you can visit all properties of a object in easy way, you can validate them as you wish, change some value if there are something sensitive, creare a mapper like automapper, and etc.
Github: https://github.com/newbe36524/Newbe.ObjectVisitor
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard1.4 is compatible. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.1
- No dependencies.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETStandard 1.4
- NETStandard.Library (>= 1.6.1)
-
net5.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Newbe.ObjectVisitor:
Package | Downloads |
---|---|
Newbe.Claptrap.StorageProvider.Relational
Newbe.Claptrap is a framework for server development. It take advantage to Actor Pattern and Event Sourcing Pattern. It could help you to build a distributed, scalable, and testable server application. This package is one part of that project. Please check the source repository for more details. Docs: https://claptrap.newbe.pro Github: https://github.com/newbe36524/Newbe.Claptrap Gitee: https://gitee.com/yks/Newbe.Claptrap |
|
Kugar.WechatSDK.MiniProgram
Package Description |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Newbe.ObjectVisitor:
Repository | Stars |
---|---|
newbe36524/Newbe.Claptrap
This is a frameworks with reactive, event sourcing and Actor pattern as basic theories. On top of this, developers can create "distributed", "scale out", and "easy to test" application more simply. Claptrap and it`s Minions is on the way.
|