Skip to main content
Version: 2.x

Class UserData

Odin UserData helper for marshal byte arrays

Assembly: cs.temp.dll.dll
Declaration
public class UserData : IUserData

Implements:
OdinNative.Wrapper.IUserData

Properties

Encoding

Default Encoding

Declaration
public Encoding Encoding { get; set; }

Buffer

Raw UserData

Declaration
public byte[] Buffer { get; set; }

Methods

CopyFrom(IntPtr, ulong)

Copies data from memory to Buffer

Declaration
public virtual void CopyFrom(IntPtr ptr, ulong size)
Parameters
TypeNameDescription
Odin.IntPtrptrsource
System.UInt64sizeBuffer size

IsEmpty()

Indicates whether data is null or empty

Declaration
public virtual bool IsEmpty()
Returns

System.Boolean: true if empty### Contains(string) Indicates whether substring occurs

Declaration
public virtual bool Contains(string value)
Returns

System.Boolean: true if contain

Parameters
TypeName
System.Stringvalue

Contains(byte)

Indicates whether element occurs

Declaration
public virtual bool Contains(byte value)
Returns

System.Boolean: true if contain

Parameters
TypeNameDescription
System.Bytevaluebyte

PatternAt(byte[])

Indicates whether two sequence are equal

Declaration
public virtual IEnumerable<int> PatternAt(byte[] pattern)
Returns

Odin.IEnumerable<System.Int32>: true if contain

Parameters
TypeNameDescription
System.Byte[]patternbyte sequence

Clone()

Creates a shallow copy of the Buffer

Declaration
public virtual UserData Clone()
Returns

OdinNative.Wrapper.UserData: new instance### ToBytes() Used for converting Data on network level

Declaration
public virtual byte[] ToBytes()
Returns

System.Byte[]: arbitrary data### ToString() String representation of Buffer based on the specified encoding

Declaration
public override string ToString()
Returns

System.String: string representation

Implements