Overview Host is an applicationProgramThe domain-level Singleton represents the orchard application. It processes initialization, beginrequest, and endrequest events in the application lifecycle. It can be simply understood that the functions of httpapplication are transferred to the host. From the source code perspective, the host corresponds to the defaultorchardhost class that implements the iorchardhost interface. Review the previous analysis of the orchard. Web. mvcapplication class. When orchard is started, a defaultorchardhost object will be created:
The content of the defaultorchardhost class is quite complex, so it is expressed in several independent sections.
1. Host Initialization For more information, see orchard source code analysis (5.1): Host initialization (defaultorchardhost. initialize method).
2. beginrequest event handling For details, see orchard source code analysis (5.2): beginrequest event processing (Defaultorchardhost . Beginrequest method)
Iii. endrequest event processing For details, see orchard source code analysis (5.3): endrequest event processing ( Defaultorchardhost . Endrequest method) Related types: Orchard. environment. defaultorchardhost: iorchardhost Orchard. Web. mvcapplication: httpapplication orchard. environment. orchardstarter Reference: How orchard works