背後原理 xamarin.macUnder the hood in Xamarin.Mac

直接的編譯 (AOT)Ahead of time compilation (AOT)

預先 (aot) 編譯是改善啟動效能功能強大的最佳化技術。Ahead of time (AOT) compilation is a powerful optimization technique for improving startup performance. 不過,它也會影響您的建置時間,應用程式大小和程式執行深遠的方式,因此很值得了解其運作方式。However, it also affects your build time, application size, and program execution in profound ways, so it's worthwhile understanding how it works.

Mac 架構Mac architecture

OBJECTIVE-C、 包括例如編譯、 選取器,註冊機構、 應用程式啟動和產生器的概念 Xamarin.Mac 的關聯性。Xamarin.Mac's relationship to Objective-C, including concepts such as compilation, selectors, registrars, app launch, and the generator.

Xamarin.Mac 的註冊機構Xamarin.Mac registrar

Xamarin.Mac 之間搭建橋樑 managed 的領域和 Cocoa 的執行階段,允許呼叫 unmanaged 的 OBJECTIVE-C 類別,並發生事件時呼叫的 managed 的類別。Xamarin.Mac bridges the gap between the managed world and Cocoa's runtime, allowing managed classes to call unmanaged Objective-C classes and be called back when events occur. 若要執行此 「 神奇 」 所需的工作由在註冊機構,但了解什麼 「 幕後 」 上還是有時會很有幫助。The work required to preform this “magic” is handled by the registrar, but understanding what's going on "under the hood" can sometimes be helpful.