Beispiel #1
0
 public static void AddLuaMapping(this ServerBuilder builder, Type type, Func <object, LuaValue> mapper)
 {
     builder.AddBuildStep((x) =>
     {
         x.GetRequiredService <LuaValueMapper>().DefineMapper(type, mapper);
     }, ServerBuildStepPriority.Low);
 }
Beispiel #2
0
 public static void AddLuaMapping <T>(this ServerBuilder builder, Func <T, LuaValue> mapper) where T : class
 {
     builder.AddBuildStep((x) =>
     {
         x.GetRequiredService <LuaValueMapper>().DefineMapper <T>(mapper);
     }, ServerBuildStepPriority.Low);
 }
 public static void AddParachuteResource(this ServerBuilder builder)
 {
     builder.AddBuildStep(server =>
     {
         var resource = new ParachuteResource(server);
         server.AddAdditionalResource(resource, resource.AdditionalFiles);
     });
     builder.AddLogic <ParachuteLogic>();
 }