Share via


NSCoder.Encode Method

Definition

Overloads

Name Description
Encode(Byte[], Int32, Int32, String)

Encodes a segment of the buffer using the specified associated key.

Encode(Single, String)
Encode(IntPtr, String)

Encodes the platform-specific native integer (32 or 64 bits) using the specified associated key.

Encode(Int64, String)
Encode(Int32, String)
Encode(Double, String)
Encode(Byte[], String)

Encodes the byte array using the specified associated key.

Encode(Boolean, String)
Encode(NSObject, String)
Encode(IntPtr, IntPtr)
Encode(CGRect, String)
Encode(CGPoint, String)
Encode(Byte[])

Encodes the byte array of an unspecified type.

Encode(NSObject)
Encode(NSData)
Encode(CGSize)
Encode(CGRect)
Encode(CGPoint)
Encode(CGSize, String)

Encode(Byte[], Int32, Int32, String)

Encodes a segment of the buffer using the specified associated key.

public void Encode(byte[] buffer, int offset, int count, string key);
member this.Encode : byte[] * int * int * string -> unit

Parameters

buffer
Byte[]

Byte array to encode.

offset
Int32

Starting point in the buffer to encode.

count
Int32

Number of bytes starting at the specified offset to encode.

key
String

Key to associate with the object being encoded.

Applies to

Encode(Single, String)

[Foundation.Export("encodeFloat:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(float val, string key);
[<Foundation.Export("encodeFloat:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : single * string -> unit
override this.Encode : single * string -> unit

Parameters

val
Single
key
String
Attributes

Applies to

Encode(IntPtr, String)

Encodes the platform-specific native integer (32 or 64 bits) using the specified associated key.

[Foundation.Export("encodeInteger:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(IntPtr val, string key);
[<Foundation.Export("encodeInteger:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : nativeint * string -> unit
override this.Encode : nativeint * string -> unit

Parameters

val
IntPtr

nativeint

Native integer value to encode.

key
String

Key to associate with the object being encoded.

Attributes

Applies to

Encode(Int64, String)

[Foundation.Export("encodeInt64:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(long val, string key);
[<Foundation.Export("encodeInt64:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : int64 * string -> unit
override this.Encode : int64 * string -> unit

Parameters

val
Int64
key
String
Attributes

Applies to

Encode(Int32, String)

[Foundation.Export("encodeInt32:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(int val, string key);
[<Foundation.Export("encodeInt32:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : int * string -> unit
override this.Encode : int * string -> unit

Parameters

val
Int32
key
String
Attributes

Applies to

Encode(Double, String)

[Foundation.Export("encodeDouble:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(double val, string key);
[<Foundation.Export("encodeDouble:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : double * string -> unit
override this.Encode : double * string -> unit

Parameters

val
Double
key
String
Attributes

Applies to

Encode(Byte[], String)

Encodes the byte array using the specified associated key.

public void Encode(byte[] buffer, string key);
member this.Encode : byte[] * string -> unit

Parameters

buffer
Byte[]

Byte array to encode.

key
String

Key to associate with the object being encoded.

Applies to

Encode(Boolean, String)

[Foundation.Export("encodeBool:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(bool val, string key);
[<Foundation.Export("encodeBool:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : bool * string -> unit
override this.Encode : bool * string -> unit

Parameters

val
Boolean
key
String
Attributes

Applies to

Encode(NSObject, String)

[Foundation.Export("encodeObject:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(Foundation.NSObject? val, string key);
[<Foundation.Export("encodeObject:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : Foundation.NSObject * string -> unit
override this.Encode : Foundation.NSObject * string -> unit

Parameters

val
NSObject
key
String
Attributes

Applies to

Encode(IntPtr, IntPtr)

[Foundation.Export("encodeBytes:length:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(IntPtr bytes, IntPtr length);
[<Foundation.Export("encodeBytes:length:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : nativeint * nativeint -> unit
override this.Encode : nativeint * nativeint -> unit

Parameters

bytes
IntPtr

nativeint

length
IntPtr

nativeint

Attributes

Applies to

Encode(CGRect, String)

[Foundation.Export("encodeRect:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(CoreGraphics.CGRect rect, string key);
[<Foundation.Export("encodeRect:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : CoreGraphics.CGRect * string -> unit
override this.Encode : CoreGraphics.CGRect * string -> unit

Parameters

rect
CGRect
key
String
Attributes

Applies to

Encode(CGPoint, String)

[Foundation.Export("encodePoint:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(CoreGraphics.CGPoint point, string key);
[<Foundation.Export("encodePoint:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : CoreGraphics.CGPoint * string -> unit
override this.Encode : CoreGraphics.CGPoint * string -> unit

Parameters

point
CGPoint
key
String
Attributes

Applies to

Encode(Byte[])

Encodes the byte array of an unspecified type.

public void Encode(byte[] buffer);
member this.Encode : byte[] -> unit

Parameters

buffer
Byte[]

Byte array to encode.

Applies to

Encode(NSObject)

[Foundation.Export("encodeObject:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(Foundation.NSObject? obj);
[<Foundation.Export("encodeObject:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : Foundation.NSObject -> unit
override this.Encode : Foundation.NSObject -> unit

Parameters

obj
NSObject
Attributes

Applies to

Encode(NSData)

[Foundation.Export("encodeDataObject:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(Foundation.NSData data);
[<Foundation.Export("encodeDataObject:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : Foundation.NSData -> unit
override this.Encode : Foundation.NSData -> unit

Parameters

data
NSData
Attributes

Applies to

Encode(CGSize)

[Foundation.Export("encodeSize:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(CoreGraphics.CGSize size);
[<Foundation.Export("encodeSize:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : CoreGraphics.CGSize -> unit
override this.Encode : CoreGraphics.CGSize -> unit

Parameters

size
CGSize
Attributes

Applies to

Encode(CGRect)

[Foundation.Export("encodeRect:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(CoreGraphics.CGRect rect);
[<Foundation.Export("encodeRect:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : CoreGraphics.CGRect -> unit
override this.Encode : CoreGraphics.CGRect -> unit

Parameters

rect
CGRect
Attributes

Applies to

Encode(CGPoint)

[Foundation.Export("encodePoint:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(CoreGraphics.CGPoint point);
[<Foundation.Export("encodePoint:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : CoreGraphics.CGPoint -> unit
override this.Encode : CoreGraphics.CGPoint -> unit

Parameters

point
CGPoint
Attributes

Applies to

Encode(CGSize, String)

[Foundation.Export("encodeSize:forKey:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void Encode(CoreGraphics.CGSize size, string key);
[<Foundation.Export("encodeSize:forKey:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member Encode : CoreGraphics.CGSize * string -> unit
override this.Encode : CoreGraphics.CGSize * string -> unit

Parameters

size
CGSize
key
String
Attributes

Applies to