Condividi tramite


NSDictionary<TKey,TValue> Costruttori

Definizione

Overload

NSDictionary<TKey,TValue>()
NSDictionary<TKey,TValue>(NSCoder)

Costruttore che inizializza l'oggetto dai dati archiviati nell'oggetto unarchiver.

NSDictionary<TKey,TValue>(NSDictionary<TKey,TValue>)
NSDictionary<TKey,TValue>(NSUrl)
NSDictionary<TKey,TValue>(String)
NSDictionary<TKey,TValue>(TKey, TValue)
NSDictionary<TKey,TValue>(TKey[], TValue[])

NSDictionary<TKey,TValue>()

public NSDictionary ();

Si applica a

NSDictionary<TKey,TValue>(NSCoder)

Costruttore che inizializza l'oggetto dai dati archiviati nell'oggetto unarchiver.

public NSDictionary (Foundation.NSCoder coder);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSCoder -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parametri

coder
NSCoder

Oggetto unarchiver.

Commenti

Questo costruttore viene fornito per consentire l'inizializzazione della classe da un nonrchiver , ad esempio durante la deserializzazione NIB. Fa parte del NSCoding protocollo.

Se gli sviluppatori vogliono creare una sottoclasse di questo oggetto e continuare a supportare la deserializzazione da un archivio, devono implementare un costruttore con una firma identica: accettando un singolo parametro di tipo NSCoder e decorarlo con la dichiarazione di attributo [Export("initWithCoder:"].

Lo stato di questo oggetto può essere serializzato anche usando il metodo complementare EncodeTo.

Si applica a

NSDictionary<TKey,TValue>(NSDictionary<TKey,TValue>)

public NSDictionary (Foundation.NSDictionary<TKey,TValue> other);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parametri

Si applica a

NSDictionary<TKey,TValue>(NSUrl)

public NSDictionary (Foundation.NSUrl url);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : Foundation.NSUrl -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parametri

url
NSUrl

Si applica a

NSDictionary<TKey,TValue>(String)

public NSDictionary (string filename);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : string -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parametri

filename
String

Si applica a

NSDictionary<TKey,TValue>(TKey, TValue)

public NSDictionary (TKey key, TValue value);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : 'Key * 'Value -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parametri

key
TKey
value
TValue

Si applica a

NSDictionary<TKey,TValue>(TKey[], TValue[])

public NSDictionary (TKey[] keys, TValue[] values);
new Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)> : 'Key[] * 'Value[] -> Foundation.NSDictionary<'Key, 'Value (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject and 'Value : null and 'Value :> ObjCRuntime.INativeObject)>

Parametri

keys
TKey[]
values
TValue[]

Si applica a