Class LuaMapperBuilderExtensions
Inherited Members
Namespace: SlipeServer.Server.Mappers
Assembly: SlipeServer.Server.dll
Syntax
public static class LuaMapperBuilderExtensions
Methods
| Edit this page View SourceAddDefaultLuaMappings(ServerBuilder)
Adds default mappings to and from lua values
Declaration
public static void AddDefaultLuaMappings(this ServerBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder |
AddFromLuaMapping(ServerBuilder, Func<LuaValue, object>, Type)
Adds a mapping from Lua values for the specified type
Declaration
public static void AddFromLuaMapping(this ServerBuilder builder, Func<LuaValue, object> mapper, Type type)
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder | |
Func<LuaValue, object> | mapper | mapper function |
Type | type | type to map from |
AddFromLuaMapping<T>(ServerBuilder, Func<LuaValue, T>)
Adds a mapping from Lua values for the specified type
Declaration
public static void AddFromLuaMapping<T>(this ServerBuilder builder, Func<LuaValue, T> mapper) where T : class
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder | |
Func<LuaValue, T> | mapper | mapper function |
Type Parameters
Name | Description |
---|---|
T | type to map from |
AddLuaMapping(ServerBuilder, Type, Func<object, LuaValue>)
Adds a lua value mapping for the specified type
Declaration
public static void AddLuaMapping(this ServerBuilder builder, Type type, Func<object, LuaValue> mapper)
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder | |
Type | type | |
Func<object, LuaValue> | mapper |
AddLuaMapping<T>(ServerBuilder, Func<T, LuaValue>)
Adds a lua value mapping for the specified type
Declaration
public static void AddLuaMapping<T>(this ServerBuilder builder, Func<T, LuaValue> mapper) where T : class
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder | |
Func<T, LuaValue> | mapper | mapper function |
Type Parameters
Name | Description |
---|---|
T | Type to map to |
AddStructLuaMapping<T>(ServerBuilder, Func<T, LuaValue>)
Adds a lua value mapping for the specified struct type
Declaration
public static void AddStructLuaMapping<T>(this ServerBuilder builder, Func<T, LuaValue> mapper) where T : struct
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder | |
Func<T, LuaValue> | mapper | mapper function |
Type Parameters
Name | Description |
---|---|
T | Type to map to |
AddVectorMappings(ServerBuilder)
Adds mappings to and from Vector3
Declaration
public static void AddVectorMappings(this ServerBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
ServerBuilder | builder |