SwiftSelf 構造体

定義

重要

この API は CLS 準拠ではありません。

Swift 'self' コンテキストを表し、引数が自己コンテキストであることを示します。

public value class SwiftSelf
[System.CLSCompliant(false)]
public readonly struct SwiftSelf
[<System.CLSCompliant(false)>]
type SwiftSelf = struct
Public Structure SwiftSelf
継承
SwiftSelf
属性

SwiftSelf コンテキストを宣言する方法の例を次に示します。

[UnmanagedCallConv(CallConvs = [typeof(CallConvSwift)])]
[DllImport("SwiftLibrary", EntryPoint = "export")]
public static extern void swiftFunction(SwiftSelf self);

注釈

この構造体は、.NETとの相互運用のコンテキストで Swift 関数に "自己" コンテキストを渡すために使用されます。

コンストラクター

名前 説明
SwiftSelf(Void*)

指定したポインター値を使用して SwiftSelf 構造体の新しいインスタンスを作成します。

プロパティ

名前 説明
Value

自己コンテキストのポインターを取得します。

適用対象