samedi 6 mars 2021

.NET : C# : retrieving the properties and their values of a remote object

I need to recursively step through an object's properties and list their names and values.
Embedded into the top-level object I bump into objects showing as 'System.Runtime.Remoting.Proxies.__TransparentProxy'
I do not succeed in stepping into such a remote object and list its properties and their values.

I need to be able to recursively walk through a nested object without any prior knowledge of how it is structured and what the property-types or embedded objects are. This works perfectly for all but remote objects.

Retrieving the path to the property is not a problem. The problem is to retrieve its value.

The procedure I am using is heavily inspired by: Recursively Get Properties & Child Properties Of A Class





Aucun commentaire:

Enregistrer un commentaire