{"id":17032969,"url":"https://github.com/tonyredondo/objectinspector","last_synced_at":"2025-04-12T12:44:19.426Z","repository":{"id":102551073,"uuid":"263755546","full_name":"tonyredondo/ObjectInspector","owner":"tonyredondo","description":"An efficient .NET object inspector/accesor to avoid reflection usage with duck typing support","archived":false,"fork":false,"pushed_at":"2020-06-23T21:02:59.000Z","size":205,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T11:05:07.780Z","etag":null,"topics":["ducktype","ducktyping","emit","netcore","reflection","runtime","runtime-compilation","tools"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonyredondo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-13T22:19:15.000Z","updated_at":"2024-12-18T02:35:26.000Z","dependencies_parsed_at":"2023-12-07T00:17:37.378Z","dependency_job_id":"906b7801-637b-48a5-9758-8daec6c0da2c","html_url":"https://github.com/tonyredondo/ObjectInspector","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":"0.37142857142857144","last_synced_commit":"30df376f8197c9c07c9d9a793f9c380cd0d3e3ef"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyredondo%2FObjectInspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyredondo%2FObjectInspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyredondo%2FObjectInspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyredondo%2FObjectInspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonyredondo","download_url":"https://codeload.github.com/tonyredondo/ObjectInspector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248570131,"owners_count":21126365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ducktype","ducktyping","emit","netcore","reflection","runtime","runtime-compilation","tools"],"created_at":"2024-10-14T08:31:21.781Z","updated_at":"2025-04-12T12:44:19.395Z","avatar_url":"https://github.com/tonyredondo.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://raw.githubusercontent.com/tonyredondo/ObjectInspector/master/icon.png\" alt=\"Duck\" width=\"45px\" height=\"45px\" /\u003e .NET Object Inspector\n![GH Actions](https://github.com/tonyredondo/ObjectInspector/workflows/.NET%20Core/badge.svg)\n[![Nuget](https://img.shields.io/nuget/vpre/Wanhjor.ObjectInspector?style=for-the-badge)](https://www.nuget.org/packages/Wanhjor.ObjectInspector/)\n\nAn efficient .NET object inspector/accesor to avoid reflection usage. \n\nPropertyFetcher, FieldFetcher, MethodCaller and DuckTyping for .NET by Expression Trees or Emitting IL at runtime.\n\n## Target Frameworks\n`netstandard2.0`, `netstandard2.1`, `netcoreapp2.0`, `netcoreapp2.1`, `net461`, `net462`, `net471`, `net472`, `net48` and `net45`.\n\n### Dependencies for *netstandard2.0*:\n\n- `System.Reflection.Emit (\u003e= 4.7.0)`\n- `System.Reflection.Emit.Lightweight (\u003e= 4.7.0)`\n\n## Usage\n\nGiven the following class with private members, the object inspector can help you to Get, Set or Invoke members of the object instance:\n```cs\nnamespace OtherAssembly \n{\n\tpublic class SomeClass \n\t{\n\t\tprivate string _privateField = \"This field it's so private...\";\n\t\tprivate string PrivateProperty { get; set; } = \"You can't read this\";\n\t\tprivate void PrivateConsoleWrite(string line) =\u003e Console.WriteLine(line);\n\t}\n\tpublic static class ObjectFactory\n\t{\n\t\tpublic static object New() =\u003e new SomeClass();\n\t}\n}\n```\n\n\u003e **Note** You can inspect, public or non public types with public or non public members, also it's compatible with anonymous objects. \n\u003eAs you can see in the following code: [![**Execute in .NET Fiddle**](https://img.shields.io/badge/.NET%20Fiddle-Execute_with_Anonymous_object-blue?style=for-the-badge)](https://dotnetfiddle.net/cBAmGG)\n\n### By using a Duck Typing mechanism\nDuck Typing can be done by using an Interface, Abstract class or a class with virtual members. The library will create a proxy type inheriting/implementing the base type.\n```cs\nnamespace MyAssembly\n{\n\tpublic interface IDuckSomeClass \n\t{\n\t\t[Duck(Name=\"_privateField\", Kind = DuckKind.Field, Flags = DuckAttribute.AllFlags)]\n\t\tstring PrivateField { get; set; }\n\n\t\t[Duck(Flags = DuckAttribute.AllFlags)]\n\t\tstring PrivateProperty { get; set; }\n\n\t\t[Duck(Flags = DuckAttribute.AllFlags)]\n\t\tvoid PrivateConsoleWrite(string line);\n\t}\n\n\tpublic class Program\n\t{\n\t\tpublic static void Main()\n\t\t{\n\t\t\tvar obj = OtherAssembly.ObjectFactory.New();\n\t\t\tHandleObject(obj);\n\t\t}\n\t\t\n\t\tpublic static void HandleObject(object obj) \n\t\t{\n\t\t\t// We can treat the object as it were implementing the IDuckSomeClass interface\n\t\t\tvar duck = obj.DuckAs\u003cIDuckSomeClass\u003e();\n\n\t\t\tConsole.WriteLine(duck.PrivateField);\n\t\t\tConsole.WriteLine(duck.PrivateProperty);\n\t\t\tConsole.WriteLine();\n\n\t\t\tduck.PrivateField += \" or not!\";\n\t\t\tduck.PrivateProperty += \". I think I can!\";\n\n\t\t\tConsole.WriteLine(duck.PrivateField);\n\t\t\tConsole.WriteLine(duck.PrivateProperty);\n\t\t\tConsole.WriteLine();\n\n\t\t\tduck.PrivateConsoleWrite(\"Sooo private...\");\n\t\t}\n\t}\n}\n```\n[![**Execute in .NET Fiddle**](https://img.shields.io/badge/.NET%20Fiddle-Execute_with_Duck_Typing-blue?style=for-the-badge)](https://dotnetfiddle.net/39RPbz)\n\n### By using a DynamicFetcher\n```cs\nnamespace MyAssembly\n{\n\tpublic class Program\n\t{\n\t\tpublic static void Main()\n\t\t{\n\t\t\tvar obj = OtherAssembly.ObjectFactory.New();\n\t\t\tHandleObject(obj);\n\t\t}\n\t\t\n\t\tprivate static readonly DynamicFetcher _privateFieldFetcher = new DynamicFetcher(\"_privateField\", DuckAttribute.AllFlags);\n\t\tprivate static readonly DynamicFetcher _privatePropertyFetcher = new DynamicFetcher(\"PrivateProperty\", DuckAttribute.AllFlags);\n\t\tprivate static readonly DynamicFetcher _privateConsoleWriteFetcher = new DynamicFetcher(\"PrivateConsoleWrite\", DuckAttribute.AllFlags);\n\t\t\n\t\tpublic static void HandleObject(object obj) \n\t\t{\n\t\t\t// We can handle the object using a dynamic fetcher\n\t\t\tConsole.WriteLine((string)_privateFieldFetcher.Fetch(obj));\n\t\t\tConsole.WriteLine((string)_privatePropertyFetcher.Fetch(obj));\n\t\t\tConsole.WriteLine();\n\n\t\t\t_privateFieldFetcher.Shove(obj, \"This field it's so private... or not!\");\n\t\t\t_privatePropertyFetcher.Shove(obj, \"You can't read this. I think I can!\");\n\n\t\t\tConsole.WriteLine((string)_privateFieldFetcher.Fetch(obj));\n\t\t\tConsole.WriteLine((string)_privatePropertyFetcher.Fetch(obj));\n\t\t\tConsole.WriteLine();\n\n\t\t\t_privateConsoleWriteFetcher.Invoke(obj, \"Sooo private...\");\n\t\t}\n\t}\n}\n```\n[![**Execute in .NET Fiddle**](https://img.shields.io/badge/.NET%20Fiddle-Execute_with_DynamicFetcher-blue?style=for-the-badge)](https://dotnetfiddle.net/mJlk9c)\n\n### By using an Object Inspector\n```cs\nnamespace MyAssembly\n{\n\tpublic class Program\n\t{\n\t\tpublic static void Main()\n\t\t{\n\t\t\tvar obj = OtherAssembly.ObjectFactory.New();\n\t\t\tHandleObject(obj);\n\t\t}\n\t\t\n\t\tpublic static void HandleObject(object obj) \n\t\t{\n\t\t\tvar inspector = new ObjectInspector(new InspectName(\"_privateField\", DuckAttribute.AllFlags), \n\t\t\t                    new InspectName(\"PrivateProperty\", DuckAttribute.AllFlags), \n\t\t\t                    new InspectName(\"PrivateConsoleWrite\", DuckAttribute.AllFlags));\n\t\t\t\n\t\t\tvar viewer = inspector.With(obj);\n\t\t\t\n\t\t\tConsole.WriteLine((string)viewer[\"_privateField\"]);\n\t\t\tConsole.WriteLine((string)viewer[\"PrivateProperty\"]);\n\t\t\tConsole.WriteLine();\n\n\t\t\tviewer[\"_privateField\"] = \"This field it's so private... or not!\";\n\t\t\tviewer[\"PrivateProperty\"] = \"You can't read this. I think I can!\";\n\n\t\t\tConsole.WriteLine((string)viewer[\"_privateField\"]);\n\t\t\tConsole.WriteLine((string)viewer[\"PrivateProperty\"]);\n\t\t\tConsole.WriteLine();\n\n\t\t\tviewer.Invoke(\"PrivateConsoleWrite\", \"Sooo private...\");\n\t\t}\n\t}\n}\n```\n[![**Execute in .NET Fiddle**](https://img.shields.io/badge/.NET%20Fiddle-Execute_with_Object_Inspector-blue?style=for-the-badge)](https://dotnetfiddle.net/dLXp8L)\n\n### By using an Inspector Tuple\n```cs\nnamespace MyAssembly\n{\n\tpublic class Program\n\t{\n\t\tpublic static void Main()\n\t\t{\n\t\t\tvar obj = OtherAssembly.ObjectFactory.New();\n\t\t\tHandleObject(obj);\n\t\t}\n\t\t\n\t\tpublic static void HandleObject(object obj) \n\t\t{\n\t\t\tvar inspTuple = new InspectorTuple\u003cstring, string, object\u003e(new InspectName(\"_privateField\", DuckAttribute.AllFlags), \n\t\t\t\t\t    new InspectName(\"PrivateProperty\", DuckAttribute.AllFlags), \n\t\t\t\t\t    new InspectName(\"PrivateConsoleWrite\", DuckAttribute.AllFlags));\n\t\t\t\n\t\t\tinspTuple.SetInstance(obj);\n\t\t\t\n\t\t\tConsole.WriteLine(inspTuple.Item1);\n\t\t\tConsole.WriteLine(inspTuple.Item2);\n\t\t\tConsole.WriteLine();\n\n\t\t\tinspTuple.Item1 = \"This field it's so private... or not!\";\n\t\t\tinspTuple.Item2 = \"You can't read this. I think I can!\";\n\n\t\t\tConsole.WriteLine(inspTuple.Item1);\n\t\t\tConsole.WriteLine(inspTuple.Item2);\n\t\t\tConsole.WriteLine();\n\n\t\t\tinspTuple.InvokeItem3(\"Sooo private...\");\n\t\t}\n\t}\n}\n```\n[![**Execute in .NET Fiddle**](https://img.shields.io/badge/.NET%20Fiddle-Execute_with_Inspector_Tuple-blue?style=for-the-badge)](https://dotnetfiddle.net/s1jkCD)\n\n\n## Benchmarks\n``` ini\nBenchmarkDotNet=v0.12.1, OS=ubuntu 19.10\nAMD Ryzen Threadripper 2950X, 1 CPU, 32 logical and 16 physical cores\n.NET Core SDK=3.1.101\n  [Host]     : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT\n  DefaultJob : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT\n```\n### Public Class\n\n#### Public Property / Getter / Object Type\n|                Method |        Mean |     Error |    StdDev |         Min |         Max |  Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |------------:|----------:|----------:|------------:|------------:|-------:|--------:|------:|------:|------:|----------:|\n|                Direct |   0.0057 ns | 0.0032 ns | 0.0030 ns |   0.0000 ns |   0.0088 ns |  0.004 |    0.00 |     - |     - |     - |         - |\n|     DuckTypeInterface |   2.1733 ns | 0.0088 ns | 0.0082 ns |   2.1614 ns |   2.1859 ns |  1.498 |    0.01 |     - |     - |     - |         - |\n|      DuckTypeAbstract |   1.4507 ns | 0.0058 ns | 0.0055 ns |   1.4409 ns |   1.4586 ns |  1.000 |    0.00 |     - |     - |     - |         - |\n|       DuckTypeVirtual |   1.4454 ns | 0.0027 ns | 0.0026 ns |   1.4419 ns |   1.4499 ns |  0.996 |    0.00 |     - |     - |     - |         - |\n| ExpressionTreeFetcher |   4.3870 ns | 0.0163 ns | 0.0136 ns |   4.3561 ns |   4.4048 ns |  3.024 |    0.01 |     - |     - |     - |         - |\n|           EmitFetcher |   4.4331 ns | 0.0154 ns | 0.0144 ns |   4.4125 ns |   4.4654 ns |  3.056 |    0.01 |     - |     - |     - |         - |\n|       DelegateFetcher |   6.4340 ns | 0.0188 ns | 0.0176 ns |   6.3985 ns |   6.4617 ns |  4.435 |    0.02 |     - |     - |     - |         - |\n|            Reflection | 107.0668 ns | 0.2081 ns | 0.1845 ns | 106.6127 ns | 107.2895 ns | 73.802 |    0.32 |     - |     - |     - |         - |\n\n#### Public Property / Getter / Value Type\n|                Method |        Mean |     Error |    StdDev |      Median |         Min |         Max |   Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |------------:|----------:|----------:|------------:|------------:|------------:|--------:|--------:|-------:|------:|------:|----------:|\n|                Direct |   0.0000 ns | 0.0000 ns | 0.0000 ns |   0.0000 ns |   0.0000 ns |   0.0000 ns |   0.000 |    0.00 |      - |     - |     - |         - |\n|     DuckTypeInterface |   1.6644 ns | 0.0080 ns | 0.0075 ns |   1.6657 ns |   1.6513 ns |   1.6773 ns |   1.193 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   1.3947 ns | 0.0074 ns | 0.0069 ns |   1.3967 ns |   1.3803 ns |   1.4034 ns |   1.000 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   1.4578 ns | 0.0124 ns | 0.0116 ns |   1.4568 ns |   1.4429 ns |   1.4750 ns |   1.045 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |  12.2679 ns | 0.2723 ns | 0.5438 ns |  12.5072 ns |  10.9949 ns |  12.9669 ns |   8.489 |    0.45 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher |  12.0793 ns | 0.2696 ns | 0.2648 ns |  12.1251 ns |  11.6069 ns |  12.6324 ns |   8.654 |    0.21 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |  15.7135 ns | 0.1862 ns | 0.1742 ns |  15.8033 ns |  15.3563 ns |  15.8849 ns |  11.267 |    0.16 | 0.0014 |     - |     - |      24 B |\n|            Reflection | 165.7264 ns | 0.7783 ns | 0.7280 ns | 165.4518 ns | 164.8954 ns | 167.2588 ns | 118.828 |    0.89 | 0.0014 |     - |     - |      24 B |\n\n#### Public Property / Setter / Object Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |   1.433 ns | 0.0095 ns | 0.0079 ns |   1.421 ns |   1.446 ns |  0.60 |    0.00 |      - |     - |     - |         - |\n|     DuckTypeInterface |   2.870 ns | 0.0080 ns | 0.0071 ns |   2.856 ns |   2.885 ns |  1.21 |    0.00 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   2.371 ns | 0.0063 ns | 0.0049 ns |   2.357 ns |   2.377 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   2.366 ns | 0.0081 ns | 0.0068 ns |   2.349 ns |   2.376 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |   5.161 ns | 0.0469 ns | 0.0439 ns |   5.074 ns |   5.232 ns |  2.18 |    0.01 |      - |     - |     - |         - |\n|           EmitFetcher |   5.181 ns | 0.0524 ns | 0.0490 ns |   5.073 ns |   5.256 ns |  2.18 |    0.03 |      - |     - |     - |         - |\n|       DelegateFetcher |   9.957 ns | 0.1754 ns | 0.1641 ns |   9.701 ns |  10.243 ns |  4.22 |    0.07 |      - |     - |     - |         - |\n|            Reflection | 215.519 ns | 0.7459 ns | 0.6977 ns | 213.798 ns | 216.511 ns | 90.86 |    0.29 | 0.0038 |     - |     - |      64 B |\n\n#### Public Property / Setter / Value Type\n|                Method |        Mean |     Error |    StdDev |      Median |         Min |         Max |  Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |------------:|----------:|----------:|------------:|------------:|------------:|-------:|--------:|-------:|------:|------:|----------:|\n|                Direct |   0.0000 ns | 0.0000 ns | 0.0000 ns |   0.0000 ns |   0.0000 ns |   0.0000 ns |  0.000 |    0.00 |      - |     - |     - |         - |\n|     DuckTypeInterface |   4.0533 ns | 0.1463 ns | 0.4199 ns |   4.1939 ns |   2.6805 ns |   4.9533 ns |  1.095 |    0.07 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   3.8792 ns | 0.0550 ns | 0.0514 ns |   3.9012 ns |   3.7611 ns |   3.9309 ns |  1.000 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   3.9063 ns | 0.0546 ns | 0.0511 ns |   3.9051 ns |   3.7578 ns |   3.9538 ns |  1.007 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |  12.7433 ns | 0.2835 ns | 0.6572 ns |  13.0110 ns |  11.1596 ns |  13.6258 ns |  3.222 |    0.21 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher |  11.2177 ns | 0.2420 ns | 0.4110 ns |  11.2254 ns |  10.5157 ns |  12.1097 ns |  2.898 |    0.13 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |  15.0292 ns | 0.0974 ns | 0.0864 ns |  15.0117 ns |  14.9219 ns |  15.2370 ns |  3.877 |    0.06 | 0.0014 |     - |     - |      24 B |\n|            Reflection | 226.4618 ns | 1.1025 ns | 0.9774 ns | 226.7582 ns | 223.5496 ns | 227.3624 ns | 58.419 |    0.91 | 0.0052 |     - |     - |      88 B |\n\n#### Public Field / Getter / Object Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|------:|--------:|------:|------:|------:|----------:|\n|                Direct |  0.0162 ns | 0.0024 ns | 0.0023 ns |  0.0127 ns |  0.0196 ns |  0.01 |    0.00 |     - |     - |     - |         - |\n|     DuckTypeInterface |  1.6780 ns | 0.0035 ns | 0.0033 ns |  1.6705 ns |  1.6825 ns |  1.20 |    0.01 |     - |     - |     - |         - |\n|      DuckTypeAbstract |  1.4006 ns | 0.0050 ns | 0.0046 ns |  1.3933 ns |  1.4075 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n|       DuckTypeVirtual |  1.3839 ns | 0.0032 ns | 0.0025 ns |  1.3799 ns |  1.3882 ns |  0.99 |    0.00 |     - |     - |     - |         - |\n| ExpressionTreeFetcher |  4.4193 ns | 0.0225 ns | 0.0211 ns |  4.3882 ns |  4.4517 ns |  3.16 |    0.02 |     - |     - |     - |         - |\n|           EmitFetcher |  4.4563 ns | 0.0221 ns | 0.0207 ns |  4.4206 ns |  4.4880 ns |  3.18 |    0.02 |     - |     - |     - |         - |\n|       DelegateFetcher |         NA |        NA |        NA |         NA |         NA |     ? |       ? |     - |     - |     - |         - |\n|            Reflection | 48.7989 ns | 0.1460 ns | 0.1294 ns | 48.6077 ns | 49.0602 ns | 34.84 |    0.12 |     - |     - |     - |         - |\n\n#### Public Field / Getter / Value Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max |  Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|-------:|--------:|-------:|------:|------:|----------:|\n|                Direct |  0.0104 ns | 0.0051 ns | 0.0048 ns |  0.0029 ns |  0.0198 ns |  0.008 |    0.00 |      - |     - |     - |         - |\n|     DuckTypeInterface |  1.6868 ns | 0.0067 ns | 0.0063 ns |  1.6743 ns |  1.6995 ns |  1.216 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |  1.3874 ns | 0.0045 ns | 0.0042 ns |  1.3799 ns |  1.3937 ns |  1.000 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |  1.3971 ns | 0.0042 ns | 0.0038 ns |  1.3869 ns |  1.4013 ns |  1.007 |    0.00 |      - |     - |     - |         - |\n| ExpressionTreeFetcher | 12.3567 ns | 0.2692 ns | 0.3773 ns | 11.3392 ns | 13.0537 ns |  8.883 |    0.33 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher | 12.7230 ns | 0.2337 ns | 0.2186 ns | 12.1087 ns | 12.9269 ns |  9.170 |    0.15 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |         NA |        NA |        NA |         NA |         NA |      ? |       ? |      - |     - |     - |         - |\n|            Reflection | 74.5795 ns | 0.6475 ns | 0.6057 ns | 73.7307 ns | 75.4323 ns | 53.754 |    0.41 | 0.0014 |     - |     - |      24 B |\n\n#### Public Field / Setter / Object Type\n|                Method |      Mean |     Error |    StdDev |       Min |       Max | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |----------:|----------:|----------:|----------:|----------:|------:|--------:|------:|------:|------:|----------:|\n|                Direct |  1.195 ns | 0.0070 ns | 0.0065 ns |  1.186 ns |  1.205 ns |  0.50 |    0.00 |     - |     - |     - |         - |\n|     DuckTypeInterface |  2.638 ns | 0.0171 ns | 0.0160 ns |  2.610 ns |  2.662 ns |  1.09 |    0.01 |     - |     - |     - |         - |\n|      DuckTypeAbstract |  2.409 ns | 0.0069 ns | 0.0064 ns |  2.392 ns |  2.417 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n|       DuckTypeVirtual |  2.411 ns | 0.0056 ns | 0.0053 ns |  2.400 ns |  2.419 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n| ExpressionTreeFetcher |  4.879 ns | 0.0398 ns | 0.0372 ns |  4.816 ns |  4.948 ns |  2.03 |    0.02 |     - |     - |     - |         - |\n|           EmitFetcher |  4.798 ns | 0.0265 ns | 0.0248 ns |  4.756 ns |  4.840 ns |  1.99 |    0.01 |     - |     - |     - |         - |\n|       DelegateFetcher |        NA |        NA |        NA |        NA |        NA |     ? |       ? |     - |     - |     - |         - |\n|            Reflection | 62.681 ns | 0.1221 ns | 0.1142 ns | 62.487 ns | 62.922 ns | 26.02 |    0.08 |     - |     - |     - |         - |\n\n#### Public Field / Setter / Value Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max |  Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|-------:|--------:|-------:|------:|------:|----------:|\n|                Direct |  0.0161 ns | 0.0066 ns | 0.0058 ns |  0.0069 ns |  0.0277 ns |  0.004 |    0.00 |      - |     - |     - |         - |\n|     DuckTypeInterface |  4.1358 ns | 0.1109 ns | 0.1442 ns |  3.6628 ns |  4.2307 ns |  1.028 |    0.04 |      - |     - |     - |         - |\n|      DuckTypeAbstract |  3.9717 ns | 0.0101 ns | 0.0085 ns |  3.9483 ns |  3.9830 ns |  1.000 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |  3.9130 ns | 0.0182 ns | 0.0171 ns |  3.8800 ns |  3.9475 ns |  0.985 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher | 10.2799 ns | 0.1900 ns | 0.1777 ns | 10.1394 ns | 10.6424 ns |  2.590 |    0.05 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher | 10.2794 ns | 0.1665 ns | 0.1710 ns | 10.0566 ns | 10.6314 ns |  2.586 |    0.05 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |         NA |        NA |        NA |         NA |         NA |      ? |       ? |      - |     - |     - |         - |\n|            Reflection | 78.7027 ns | 0.2133 ns | 0.1891 ns | 78.3381 ns | 78.9225 ns | 19.823 |    0.06 | 0.0014 |     - |     - |      24 B |\n\n#### Public Method / Invoker\n|                Method |        Mean |     Error |    StdDev |      Median |         Min |         Max |   Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |------------:|----------:|----------:|------------:|------------:|------------:|--------:|--------:|-------:|------:|------:|----------:|\n|                Direct |   0.0042 ns | 0.0042 ns | 0.0039 ns |   0.0028 ns |   0.0000 ns |   0.0118 ns |   0.002 |    0.00 |      - |     - |     - |         - |\n|     DuckTypeInterface |   2.4260 ns | 0.0095 ns | 0.0089 ns |   2.4228 ns |   2.4145 ns |   2.4431 ns |   1.415 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   1.7151 ns | 0.0077 ns | 0.0072 ns |   1.7147 ns |   1.7045 ns |   1.7298 ns |   1.000 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   1.7322 ns | 0.0082 ns | 0.0077 ns |   1.7330 ns |   1.7175 ns |   1.7472 ns |   1.010 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |  48.6474 ns | 0.6056 ns | 0.5665 ns |  48.8195 ns |  46.8674 ns |  49.2839 ns |  28.364 |    0.35 | 0.0067 |     - |     - |     112 B |\n|           EmitFetcher |  48.7790 ns | 0.1421 ns | 0.1186 ns |  48.7748 ns |  48.5905 ns |  49.0109 ns |  28.432 |    0.14 | 0.0067 |     - |     - |     112 B |\n|       DelegateFetcher |          NA |        NA |        NA |          NA |          NA |          NA |       ? |       ? |      - |     - |     - |         - |\n|            Reflection | 351.2802 ns | 0.9316 ns | 0.8258 ns | 351.4524 ns | 349.1993 ns | 352.0959 ns | 204.823 |    0.96 | 0.0091 |     - |     - |     152 B |\n\n### Private Class\n\n#### Private Property / Getter / Object Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|------:|--------:|------:|------:|------:|----------:|\n|                Direct |         NA |        NA |        NA |         NA |         NA |     ? |       ? |     - |     - |     - |         - |\n|     DuckTypeInterface |   2.671 ns | 0.0046 ns | 0.0043 ns |   2.666 ns |   2.681 ns |  1.11 |    0.00 |     - |     - |     - |         - |\n|      DuckTypeAbstract |   2.408 ns | 0.0077 ns | 0.0072 ns |   2.398 ns |   2.422 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n|       DuckTypeVirtual |   2.154 ns | 0.0070 ns | 0.0065 ns |   2.145 ns |   2.166 ns |  0.89 |    0.00 |     - |     - |     - |         - |\n| ExpressionTreeFetcher |   4.444 ns | 0.0162 ns | 0.0144 ns |   4.421 ns |   4.469 ns |  1.85 |    0.01 |     - |     - |     - |         - |\n|           EmitFetcher |   4.427 ns | 0.0241 ns | 0.0225 ns |   4.398 ns |   4.470 ns |  1.84 |    0.01 |     - |     - |     - |         - |\n|       DelegateFetcher |   6.422 ns | 0.0151 ns | 0.0134 ns |   6.402 ns |   6.439 ns |  2.67 |    0.01 |     - |     - |     - |         - |\n|            Reflection | 106.718 ns | 0.2564 ns | 0.2273 ns | 106.414 ns | 107.070 ns | 44.31 |    0.16 |     - |     - |     - |         - |\n\n#### Private Property / Getter / Value Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |         NA |        NA |        NA |         NA |         NA |     ? |       ? |      - |     - |     - |         - |\n|     DuckTypeInterface |   2.881 ns | 0.0089 ns | 0.0083 ns |   2.863 ns |   2.891 ns |  1.19 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   2.413 ns | 0.0105 ns | 0.0099 ns |   2.388 ns |   2.426 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   2.415 ns | 0.0088 ns | 0.0074 ns |   2.397 ns |   2.426 ns |  1.00 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |  12.329 ns | 0.2724 ns | 0.2548 ns |  11.700 ns |  12.732 ns |  5.11 |    0.12 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher |  12.127 ns | 0.2682 ns | 0.4482 ns |  10.431 ns |  12.552 ns |  4.99 |    0.19 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |  14.618 ns | 0.2838 ns | 0.2655 ns |  14.230 ns |  14.984 ns |  6.06 |    0.10 | 0.0014 |     - |     - |      24 B |\n|            Reflection | 170.210 ns | 1.0057 ns | 0.9407 ns | 168.702 ns | 171.906 ns | 70.55 |    0.55 | 0.0014 |     - |     - |      24 B |\n\n#### Private Property / Setter / Object Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |         NA |        NA |        NA |         NA |         NA |     ? |       ? |      - |     - |     - |         - |\n|     DuckTypeInterface |   3.967 ns | 0.0965 ns | 0.0903 ns |   3.764 ns |   4.097 ns |  1.09 |    0.02 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   3.639 ns | 0.0086 ns | 0.0076 ns |   3.626 ns |   3.652 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   3.647 ns | 0.0076 ns | 0.0071 ns |   3.638 ns |   3.657 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |   4.728 ns | 0.1222 ns | 0.1143 ns |   4.503 ns |   4.838 ns |  1.30 |    0.03 |      - |     - |     - |         - |\n|           EmitFetcher |   4.765 ns | 0.1213 ns | 0.1075 ns |   4.393 ns |   4.803 ns |  1.31 |    0.03 |      - |     - |     - |         - |\n|       DelegateFetcher |  10.804 ns | 0.2419 ns | 0.2971 ns |   9.875 ns |  11.082 ns |  2.97 |    0.09 |      - |     - |     - |         - |\n|            Reflection | 190.189 ns | 1.3800 ns | 1.2908 ns | 188.956 ns | 193.633 ns | 52.23 |    0.36 | 0.0038 |     - |     - |      64 B |\n\n#### Private Property / Setter / Value Type\n|                Method |       Mean |     Error |    StdDev |        Min |        Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |-----------:|----------:|----------:|-----------:|-----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |         NA |        NA |        NA |         NA |         NA |     ? |       ? |      - |     - |     - |         - |\n|     DuckTypeInterface |   3.686 ns | 0.0158 ns | 0.0148 ns |   3.660 ns |   3.708 ns |  1.02 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |   3.612 ns | 0.0239 ns | 0.0224 ns |   3.589 ns |   3.652 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |   3.628 ns | 0.0100 ns | 0.0078 ns |   3.614 ns |   3.639 ns |  1.00 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher |  11.522 ns | 0.3087 ns | 0.9103 ns |  10.283 ns |  13.249 ns |  3.02 |    0.20 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher |  10.236 ns | 0.2166 ns | 0.4015 ns |   9.821 ns |  11.229 ns |  2.89 |    0.10 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |  14.316 ns | 0.1558 ns | 0.1457 ns |  13.995 ns |  14.607 ns |  3.96 |    0.05 | 0.0014 |     - |     - |      24 B |\n|            Reflection | 207.938 ns | 1.0840 ns | 1.0139 ns | 206.318 ns | 210.046 ns | 57.57 |    0.50 | 0.0052 |     - |     - |      88 B |\n\n#### Private Field / Getter / Object Type\n|                Method |      Mean |     Error |    StdDev |       Min |       Max | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |----------:|----------:|----------:|----------:|----------:|------:|--------:|------:|------:|------:|----------:|\n|                Direct |        NA |        NA |        NA |        NA |        NA |     ? |       ? |     - |     - |     - |         - |\n|     DuckTypeInterface |  3.147 ns | 0.0216 ns | 0.0191 ns |  3.125 ns |  3.180 ns |  1.30 |    0.01 |     - |     - |     - |         - |\n|      DuckTypeAbstract |  2.420 ns | 0.0050 ns | 0.0045 ns |  2.408 ns |  2.425 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n|       DuckTypeVirtual |  2.407 ns | 0.0151 ns | 0.0126 ns |  2.387 ns |  2.432 ns |  0.99 |    0.01 |     - |     - |     - |         - |\n| ExpressionTreeFetcher |  4.480 ns | 0.0549 ns | 0.0487 ns |  4.415 ns |  4.588 ns |  1.85 |    0.02 |     - |     - |     - |         - |\n|           EmitFetcher |  4.401 ns | 0.0182 ns | 0.0162 ns |  4.366 ns |  4.428 ns |  1.82 |    0.01 |     - |     - |     - |         - |\n|       DelegateFetcher |        NA |        NA |        NA |        NA |        NA |     ? |       ? |     - |     - |     - |         - |\n|            Reflection | 49.517 ns | 0.2291 ns | 0.2143 ns | 49.099 ns | 49.789 ns | 20.48 |    0.09 |     - |     - |     - |         - |\n\n#### Private Field / Getter / Value Type\n|                Method |      Mean |     Error |    StdDev |       Min |       Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |----------:|----------:|----------:|----------:|----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |        NA |        NA |        NA |        NA |        NA |     ? |       ? |      - |     - |     - |         - |\n|     DuckTypeInterface |  2.847 ns | 0.0154 ns | 0.0137 ns |  2.814 ns |  2.864 ns |  1.20 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |  2.381 ns | 0.0164 ns | 0.0137 ns |  2.358 ns |  2.402 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |  2.396 ns | 0.0074 ns | 0.0069 ns |  2.382 ns |  2.408 ns |  1.01 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher | 11.441 ns | 0.2568 ns | 0.6584 ns | 10.388 ns | 13.203 ns |  4.99 |    0.27 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher | 12.052 ns | 0.2697 ns | 0.4652 ns | 10.618 ns | 12.944 ns |  5.12 |    0.26 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |        NA |        NA |        NA |        NA |        NA |     ? |       ? |      - |     - |     - |         - |\n|            Reflection | 81.354 ns | 0.9989 ns | 0.8855 ns | 79.770 ns | 82.538 ns | 34.14 |    0.50 | 0.0014 |     - |     - |      24 B |\n\n#### Private Field / Setter / Object Type\n|                Method |      Mean |     Error |    StdDev |       Min |       Max | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |----------:|----------:|----------:|----------:|----------:|------:|--------:|------:|------:|------:|----------:|\n|                Direct |        NA |        NA |        NA |        NA |        NA |     ? |       ? |     - |     - |     - |         - |\n|     DuckTypeInterface |  3.605 ns | 0.0140 ns | 0.0117 ns |  3.578 ns |  3.619 ns |  0.99 |    0.00 |     - |     - |     - |         - |\n|      DuckTypeAbstract |  3.649 ns | 0.0149 ns | 0.0140 ns |  3.625 ns |  3.675 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n|       DuckTypeVirtual |  3.656 ns | 0.0169 ns | 0.0158 ns |  3.629 ns |  3.676 ns |  1.00 |    0.00 |     - |     - |     - |         - |\n| ExpressionTreeFetcher |  4.772 ns | 0.0397 ns | 0.0371 ns |  4.715 ns |  4.816 ns |  1.31 |    0.01 |     - |     - |     - |         - |\n|           EmitFetcher |  4.822 ns | 0.0209 ns | 0.0174 ns |  4.784 ns |  4.858 ns |  1.32 |    0.01 |     - |     - |     - |         - |\n|       DelegateFetcher |        NA |        NA |        NA |        NA |        NA |     ? |       ? |     - |     - |     - |         - |\n|            Reflection | 61.724 ns | 0.2886 ns | 0.2559 ns | 61.262 ns | 62.284 ns | 16.91 |    0.10 |     - |     - |     - |         - |\n\n#### Private Field / Setter / Value Type\n|                Method |      Mean |     Error |    StdDev |       Min |       Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |----------:|----------:|----------:|----------:|----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |        NA |        NA |        NA |        NA |        NA |     ? |       ? |      - |     - |     - |         - |\n|     DuckTypeInterface |  3.701 ns | 0.0248 ns | 0.0207 ns |  3.673 ns |  3.729 ns |  1.02 |    0.01 |      - |     - |     - |         - |\n|      DuckTypeAbstract |  3.633 ns | 0.0218 ns | 0.0182 ns |  3.605 ns |  3.663 ns |  1.00 |    0.00 |      - |     - |     - |         - |\n|       DuckTypeVirtual |  3.635 ns | 0.0262 ns | 0.0232 ns |  3.587 ns |  3.666 ns |  1.00 |    0.01 |      - |     - |     - |         - |\n| ExpressionTreeFetcher | 10.347 ns | 0.1572 ns | 0.1393 ns | 10.118 ns | 10.510 ns |  2.85 |    0.04 | 0.0014 |     - |     - |      24 B |\n|           EmitFetcher | 10.958 ns | 0.2460 ns | 0.5188 ns | 10.207 ns | 12.344 ns |  3.00 |    0.15 | 0.0014 |     - |     - |      24 B |\n|       DelegateFetcher |        NA |        NA |        NA |        NA |        NA |     ? |       ? |      - |     - |     - |         - |\n|            Reflection | 72.224 ns | 0.4226 ns | 0.3953 ns | 71.470 ns | 72.778 ns | 19.87 |    0.19 | 0.0014 |     - |     - |      24 B |\n\n#### Private Method / Invoker\n|                Method |      Mean |    Error |   StdDev |       Min |       Max | Ratio | RatioSD |  Gen 0 | Gen 1 | Gen 2 | Allocated |\n|---------------------- |----------:|---------:|---------:|----------:|----------:|------:|--------:|-------:|------:|------:|----------:|\n|                Direct |        NA |       NA |       NA |        NA |        NA |     ? |       ? |      - |     - |     - |         - |\n|     DuckTypeInterface |  59.46 ns | 0.536 ns | 0.476 ns |  58.59 ns |  60.31 ns |  1.03 |    0.01 | 0.0067 |     - |     - |     112 B |\n|      DuckTypeAbstract |  57.49 ns | 0.568 ns | 0.531 ns |  56.77 ns |  58.35 ns |  1.00 |    0.00 | 0.0067 |     - |     - |     112 B |\n|       DuckTypeVirtual |  56.76 ns | 0.176 ns | 0.164 ns |  56.50 ns |  56.99 ns |  0.99 |    0.01 | 0.0067 |     - |     - |     112 B |\n| ExpressionTreeFetcher |  48.86 ns | 0.301 ns | 0.281 ns |  48.43 ns |  49.32 ns |  0.85 |    0.01 | 0.0067 |     - |     - |     112 B |\n|           EmitFetcher |  49.22 ns | 0.565 ns | 0.472 ns |  48.42 ns |  49.90 ns |  0.86 |    0.01 | 0.0067 |     - |     - |     112 B |\n|       DelegateFetcher |        NA |       NA |       NA |        NA |        NA |     ? |       ? |      - |     - |     - |         - |\n|            Reflection | 355.14 ns | 2.225 ns | 2.082 ns | 351.81 ns | 358.70 ns |  6.18 |    0.06 | 0.0091 |     - |     - |     152 B |\n\n## Powered By\n\u003cimg src=\"https://raw.githubusercontent.com/tonyredondo/TWCore2/master/doc/rider.jpg\" alt=\"Rider\" width=\"50px\" height=\"50px\" /\u003e\u003cimg src=\"https://raw.githubusercontent.com/tonyredondo/TWCore2/master/doc/dotTrace.png\" alt=\"dotTrace\" width=\"50px\" height=\"50px\" /\u003e\u003cimg src=\"https://raw.githubusercontent.com/tonyredondo/TWCore2/master/doc/dotMemory.png\" alt=\"dotMemory\" width=\"50px\" height=\"50px\" /\u003e\n\nThanks to @jetbrains for helping on this development with the licenses for Rider, dotTrace and dotMemory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyredondo%2Fobjectinspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonyredondo%2Fobjectinspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyredondo%2Fobjectinspector/lists"}