Phoenix.Channel.Trigger C# (CSharp) Méthode

Trigger() private méthode

private Trigger ( string triggerEvent, Newtonsoft.Json.Linq.JObject payload = null, string ref_ = null ) : void
triggerEvent string
payload Newtonsoft.Json.Linq.JObject
ref_ string
Résultat void
    internal void Trigger(string triggerEvent, JObject payload = null, string ref_ = null)
    {
      OnMessage(triggerEvent, payload, ref_); //jfis - this might only be valuable in js land
      _bindings.Where(b => b.Event == triggerEvent).ToList().ForEach(b => b.Callback(payload, ref_));
    }

Usage Example

Exemple #1
0
        //trigger(status, response){
        //  this.channel.trigger(this.refEvent, {status, response})
        //}
        internal void Trigger(string status, JObject response)
        {
            var data = new JObject();

            data["status"]   = status;
            data["response"] = response;
            _channel.Trigger(_refEvent, data);
        }
All Usage Examples Of Phoenix.Channel::Trigger