As mentioned above, class serialization can be realized through inheritance.
The current plan is as follows:
1. Implement serializable for all input and output parameters (originally serialized is not required)
2. Generate a proxy class in the current domain, which encapsulates all input parameters and calls the remote domain method.
3. Generate a proxy class in the independent domain, receive the input parameter and call the actual method, and encapsulate the return value.
Call Process
ItselfCode-> Local proxy class-> encapsulate input parameters-> Cross-origin access-> receive input parameters and call the actual DLL-> encapsulate return values-> local proxy class receives response parameters
Three assemblies must be dynamically generated.
A proxy class that saves the current domainProgramSet
A proxy assembly that saves independent Domains
There is also a class for saving all objects (input and output parameters)
Dynamic generation of object classes includes the following content (the classes mentioned below are not serializable)
All independent classes
Public attributes and public fields that cannot be serialized for all classes
Unserializable parts of all collection classes
Next articleArticleDescribes how to use codecompiler to dynamically generate an assembly