Photon Fusion 2.1.1

Unsafe Class Reference

Provides substitution for missing System.Runtime.CompilerServices.Unsafe. More...

Static Public Member Functions

static ref T Add< T > (ref T source, int elementOffset)
 Adds an element offset to the given reference.
static ref TTo As< TFrom, TTo > (ref TFrom source)
 Casts the given object to the specified type.
static unsafe void * AsPointer< T > (ref T value)
 Returns an unmanaged pointer corresponding to the original source pointer.
static unsafe ref T AsRef< T > (in T source)
 Returns a managed pointer to a value of type T.
static unsafe ref T AsRef< T > (void *source)
 Returns a managed pointer to a value of type T.
static void CopyBlock (ref byte destination, ref readonly byte source, uint byteCount)
 Copies bytes from the source address to the destination address.
static unsafe void CopyBlock (void *destination, void *source, uint byteCount)
 Copies bytes from the source address to the destination address.
static void CopyBlockUnaligned (ref byte destination, ref readonly byte source, uint byteCount)
 Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.
static unsafe void CopyBlockUnaligned (void *destination, void *source, uint byteCount)
 Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.
static unsafe void InitBlock (void *startAddress, byte value, uint byteCount)
 Initializes a block of memory at the given location with a given initial value.
static unsafe void InitBlockUnaligned (void *startAddress, byte value, uint byteCount)
 Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.
static unsafe T Read< T > (void *source)
 Writes a value of type T to the given location.
static unsafe T ReadUnaligned< T > (ref byte source)
 Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
static unsafe T ReadUnaligned< T > (void *source)
 Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
static int SizeOf< T > ()
 Returns the size of an object of the given type parameter.
static void SkipInit< T > (out T value)
 Bypasses definite assignment rules for a given reference.
static unsafe void Write< T > (void *destination, T value)
 Writes a value of type T to the given location.
static unsafe void WriteUnaligned< T > (ref byte destination, T value)
 Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
static unsafe void WriteUnaligned< T > (void *destination, T value)
 Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

Detailed Description

Provides substitution for missing System.Runtime.CompilerServices.Unsafe.