Disinfect a session object without a type reference?

I have a POCO (plain old clr object) stored in a session and would like to be able to reference the properties of this object from another process (B). I do not want the standalone process (B) to require a reference to the DLL in which the poco class is defined. Is it possible to convert a saved object (in a session) into something readable (for example, xml) without reference to the class of the object?

+3
source share
4 answers

You will need to create your own code to serialize and / or deserialize the object.

Without a reference to the assembly, .NET does not have the necessary metadata to do your job.

XML, .

<Object Type="1">
    <Property1>Value</Property1>
</Object>

, , , .NET.

+1

, , DLL .

+1

, , ( ), B. XmlSerializer, , , B XML.

0

, , . ? ASP.NET, !

0
source

Source: https://habr.com/ru/post/1704902/


All Articles