語言

AEAssessmentBinaryExecutableConfiguration 建構函式

定義

多載

名稱 Description
AEAssessmentBinaryExecutableConfiguration()

建立一個預設值的新版本 AEAssessmentBinaryExecutableConfiguration 。

AEAssessmentBinaryExecutableConfiguration(NSObjectFlag)

用來呼叫衍生類別跳過初始化,僅僅配置物件。

AEAssessmentBinaryExecutableConfiguration(NativeHandle)

一種用於建立未受管理物件的受管理表示的建構器。 由執行時呼叫。

AEAssessmentBinaryExecutableConfiguration()

建立一個預設值的新版本 AEAssessmentBinaryExecutableConfiguration 。

[Foundation.Export("init")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public AEAssessmentBinaryExecutableConfiguration();
屬性

適用於

AEAssessmentBinaryExecutableConfiguration(NSObjectFlag)

用來呼叫衍生類別跳過初始化,僅僅配置物件。

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
protected AEAssessmentBinaryExecutableConfiguration(Foundation.NSObjectFlag t);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
new AutomaticAssessmentConfiguration.AEAssessmentBinaryExecutableConfiguration : Foundation.NSObjectFlag -> AutomaticAssessmentConfiguration.AEAssessmentBinaryExecutableConfiguration

參數

t
NSObjectFlag

未使用的哨兵值,通過NSObjectFlag。空。

屬性

備註

當衍生類別在受管理程式碼中完全建構該物件,並僅希望執行時能配置並初始化 。NSObject 這是實作 Objective-C 所使用的兩步驟初始化流程所必需的,第一步是執行物件配置,第二步是初始化物件。 當開發者呼叫此建構子時,他們利用一條直接路徑,一路延伸至 , NSObject 僅分配物件的記憶體並將 Objective-C 與 C# 物件綁定在一起。 物件的初始化由開發者決定。

此建構子通常由綁定產生器用來分配物件,但阻止實際初始化的進行。 一旦配置完成,建構子必須初始化該物件。 對於由綁定產生器產生的建構子,這表示它會手動呼叫其中一個「init」方法來初始化物件。

如果開發者用這個建構子鏈鏈鏈,完全初始化物件是他們的責任。

一般而言,如果開發者的建構子呼叫對應的基礎實作,也應該呼叫一個 Objective-C 初始化方法。 如果不是這樣,開發者應該直接連結到類別中的正確建構子。

參數值被忽略,僅確保唯一執行的程式碼是建構階段,即基本 NSObject 配置與執行時類型註冊。 通常連鎖方式會是這樣:

//
// The NSObjectFlag constructor merely allocates the object and registers the C# class with the Objective-C runtime if necessary.
// No actual initXxx method is invoked, that is done later in the constructor
//
// This is taken from the iOS SDK's source code for the UIView class:
//
[Export ("initWithFrame:")]
public UIView (CGRect frame) : base (NSObjectFlag.Empty)
{
    // Invoke the init method now.
    var initWithFrame = new Selector ("initWithFrame:").Handle;
    if (IsDirectBinding) {
        Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSend_CGRect (this.Handle, initWithFrame, frame);
    } else {
        unsafe {
            var __objc_super__ = new ObjCRuntime.ObjCSuper (this);
            Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect (&__objc_super__, initWithFrame, frame);
        }
        GC.KeepAlive (this);
    }
}

適用於

AEAssessmentBinaryExecutableConfiguration(NativeHandle)

一種用於建立未受管理物件的受管理表示的建構器。 由執行時呼叫。

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
protected internal AEAssessmentBinaryExecutableConfiguration(ObjCRuntime.NativeHandle handle);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
new AutomaticAssessmentConfiguration.AEAssessmentBinaryExecutableConfiguration : ObjCRuntime.NativeHandle -> AutomaticAssessmentConfiguration.AEAssessmentBinaryExecutableConfiguration

參數

handle
NativeHandle

指向未管理物件的指標(handle)。

屬性

備註

此建構子由執行環境架構(GetNSObject(IntPtr))調用,以建立指向非管理 Objective-C 物件指標的新受管理表示法。 開發者不應直接呼叫此方法,而是應 GetNSObject(IntPtr) 呼叫,因為它能防止兩個受管理物件指向同一原生物件的實例。

適用於