public SessionWrap(Session session) { this.session = session; SessionCallbackComponent sessionComponent = this.session.AddComponent <SessionCallbackComponent>(); sessionComponent.MessageCallback = (s, p) => { this.Run(s, p); }; sessionComponent.DisposeCallback = s => { this.Dispose(); }; }
public override void Awake(Session self, AChannel b) { self.Awake(b); SessionCallbackComponent sessionComponent = self.AddComponent <SessionCallbackComponent>(); sessionComponent.MessageCallback = (s, flag, opcode, memoryStream) => { self.Run(s, flag, opcode, memoryStream); }; sessionComponent.DisposeCallback = s => { self.Dispose(); }; }