Class UserData
Odin UserData helper for marshal byte arrays
Declaration
Implements:
OdinNative.Odin.IUserData
Properties
Encoding
Default Encoding
Declaration
Buffer
Raw UserData
Declaration
Methods
CopyFrom(IntPtr, ulong)
Copies data from memory to Buffer
Declaration
Parameters
Type | Name | Description |
---|---|---|
Global.IntPtr | ptr | source |
System.UInt64 | size | Buffer size |
IsEmpty()
Indicates whether data is null or empty
Declaration
Returns
System.Boolean
: true if empty### Contains(string)
Indicates whether substring occurs
Declaration
Returns
System.Boolean
: true if contain
Parameters
Type | Name |
---|---|
System.String | value |
Contains(byte)
Indicates whether element occurs
Declaration
Returns
System.Boolean
: true if contain
Parameters
Type | Name | Description |
---|---|---|
System.Byte | value | byte |
PatternAt(byte[])
Indicates whether two sequence are equal
Declaration
Returns
Global.IEnumerable<System.Int32>
: true if contain
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | pattern | byte sequence |
Clone()
Creates a shallow copy of the Buffer
Declaration
Returns
OdinNative.Odin.UserData: new instance### ToBytes() Used for converting Data on network level
Declaration
Returns
System.Byte[]
: arbitrary data### ToString()
String representation of Buffer based on the specified encoding
Declaration
Returns
System.String
: string representation