Show / Hide Table of Contents

# Class Helpers

##### Inheritance

object
Helpers

###### Namespace: LiteEntitySystem

###### Assembly: LiteEntitySystem.dll

##### Syntax

    public static class Helpers

### Methods

#### GetEnumValueInt<T>(T)

##### Declaration

    public static int GetEnumValueInt<T>(this T e) where T : unmanaged, Enum

##### Parameters

Type | Name | Description
--- | --- | ---
T | e |

##### Returns

Type | Description
--- | ---
int |

##### Type Parameters

Name | Description
--- | ---
T |

#### GetEnumValue<T>(SyncVar<T>)

##### Declaration

    public static long GetEnumValue<T>(this SyncVar<T> e) where T : unmanaged, Enum

##### Parameters

Type | Name | Description
--- | --- | ---
SyncVar<T> | e |

##### Returns

Type | Description
--- | ---
long |

##### Type Parameters

Name | Description
--- | ---
T |

#### GetEnumValue<T>(T)

##### Declaration

    public static long GetEnumValue<T>(this T e) where T : unmanaged, Enum

##### Parameters

Type | Name | Description
--- | --- | ---
T | e |

##### Returns

Type | Description
--- | ---
long |

##### Type Parameters

Name | Description
--- | ---
T |

#### HasFlagFast<T>(SyncVar<T>, T)

##### Declaration

    public static bool HasFlagFast<T>(this SyncVar<T> e, T flag) where T : unmanaged, Enum

##### Parameters

Type | Name | Description
--- | --- | ---
SyncVar<T> | e |
T | flag |

##### Returns

Type | Description
--- | ---
bool |

##### Type Parameters

Name | Description
--- | ---
T |

#### HasFlagFast<T>(T, T)

##### Declaration

    public static bool HasFlagFast<T>(this T e, T flag) where T : unmanaged, Enum

##### Parameters

Type | Name | Description
--- | --- | ---
T | e |
T | flag |

##### Returns

Type | Description
--- | ---
bool |

##### Type Parameters

Name | Description
--- | ---
T |

#### ReadStruct<T>(ReadOnlySpan<byte>)

##### Declaration

    public static T ReadStruct<T>(this ReadOnlySpan<byte> data) where T : unmanaged

##### Parameters

Type | Name | Description
--- | --- | ---
ReadOnlySpan<byte> | data |

##### Returns

Type | Description
--- | ---
T |

##### Type Parameters

Name | Description
--- | ---
T |

#### ReadStruct<T>(ReadOnlySpan<byte>, out T)

##### Declaration

    public static int ReadStruct<T>(this ReadOnlySpan<byte> data, out T value) where T : unmanaged

##### Parameters

Type | Name | Description
--- | --- | ---
ReadOnlySpan<byte> | data |
T | value |

##### Returns

Type | Description
--- | ---
int |

##### Type Parameters

Name | Description
--- | ---
T |

#### SizeOfStruct<T>()

##### Declaration

    public static int SizeOfStruct<T>() where T : unmanaged

##### Returns

Type | Description
--- | ---
int |

##### Type Parameters

Name | Description
--- | ---
T |

#### WriteStruct<T>(Span<byte>, T)

##### Declaration

    public static int WriteStruct<T>(this Span<byte> data, T value) where T : unmanaged

##### Parameters

Type | Name | Description
--- | --- | ---
Span<byte> | data |
T | value |

##### Returns

Type | Description
--- | ---
int |

##### Type Parameters

Name | Description
--- | ---
T |