public static TesterBehavior AddTesterBehaviorToScene(ISceneHost scene) { var result = new TesterBehavior(scene); scene.Starting.Add(result.OnStarting); scene.Connected.Add(result.OnConnected); scene.Disconnected.Add(result.OnDisconnected); scene.AddRoute("echo", result.OnEcho); scene.AddRoute("transfert", result.OnTransfert); scene.AddRoute("broadcast", result.OnBroadcast); scene.AddProcedure("rpc", result.OnRpc); scene.AddProcedure("rpcping", result.OnRpcPing); scene.Shuttingdown.Add(result.OnShutDown); return result; }
public static TesterBehavior AddTesterBehaviorToScene(ISceneHost scene) { var result = new TesterBehavior(scene); scene.Starting.Add(result.OnStarting); scene.Connected.Add(result.OnConnected); scene.Disconnected.Add(result.OnDisconnected); scene.AddRoute("echo", result.OnEcho); scene.AddRoute("transfert", result.OnTransfert); scene.AddRoute("broadcast", result.OnBroadcast); scene.AddProcedure("rpc", result.OnRpc); scene.AddProcedure("rpcping", result.OnRpcPing); scene.Shuttingdown.Add(result.OnShutDown); return(result); }
public void Run(IAppBuilder builder) { builder.SceneTemplate("tester", scene => TesterBehavior.AddTesterBehaviorToScene(scene)); }