Photon Fusion 2.0.6

Static Public Member Functions | List of all members
Unsafe Class Reference

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

Static Public Member Functions

static ref TTo As< TFrom, TTo > (ref TFrom source)
 Casts the given object to the specified type. More...
 
static unsafe void * AsPointer< T > (ref T value)
 Returns an unmanaged pointer corresponding to the original source pointer. More...
 
static unsafe ref T AsRef< T > (in T source)
 Returns a managed pointer to a value of type T. More...
 
static unsafe ref T AsRef< T > (void *source)
 Returns a managed pointer to a value of type T. More...
 
static unsafe T Read< T > (void *source)
 Writes a value of type T to the given location. More...
 
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. More...
 
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. More...
 
static unsafe void Write< T > (void *destination, T value)
 Writes a value of type T to the given location. More...
 
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. More...
 
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. More...
 

Detailed Description

Provides substitution for missing System.Runtime.CompilerServices.Unsafe

Member Function Documentation

◆ As< TFrom, TTo >()

static ref TTo As< TFrom, TTo > ( ref TFrom  source)
static

Casts the given object to the specified type.

◆ AsPointer< T >()

static unsafe void* AsPointer< T > ( ref T  value)
static

Returns an unmanaged pointer corresponding to the original source pointer.

◆ AsRef< T >() [1/2]

static unsafe ref T AsRef< T > ( in T  source)
static

Returns a managed pointer to a value of type T.

◆ AsRef< T >() [2/2]

static unsafe ref T AsRef< T > ( void *  source)
static

Returns a managed pointer to a value of type T.

◆ Read< T >()

static unsafe T Read< T > ( void *  source)
static

Writes a value of type T to the given location.

◆ ReadUnaligned< T >() [1/2]

static unsafe T ReadUnaligned< T > ( ref byte  source)
static

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

◆ ReadUnaligned< T >() [2/2]

static unsafe T ReadUnaligned< T > ( void *  source)
static

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

◆ Write< T >()

static unsafe void Write< T > ( void *  destination,
value 
)
static

Writes a value of type T to the given location.

◆ WriteUnaligned< T >() [1/2]

static unsafe void WriteUnaligned< T > ( ref byte  destination,
value 
)
static

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.

◆ WriteUnaligned< T >() [2/2]

static unsafe void WriteUnaligned< T > ( void *  destination,
value 
)
static

Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.