A project calls more than 100 existing DLL five to automatically encapsulate the logic of cross-origin calls

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.