private AVIMEventArgs ProcessAVSession(IDictionary<string, object> data)
 {
     AVIMEventArgs avimEventArgs = new AVIMEventArgs();
     AVSessionOp avSessionOp = new AVSessionOp();
     string str = AVRMProtocolUtils.CaptureValueFromDictionary<string>(data, "op");
     avSessionOp.id = AVRMProtocolUtils.CaptureValueFromDictionary<string>(data, "i");
     avSessionOp.op = str;
     avSessionOp.data = data;
     avimEventArgs.SessionOp = avSessionOp;
     return avimEventArgs;
 }
 private void rtc_OnMessage(object sender, AVIMEventArgs e)
 {
     if (this.m_OnMessage != null)
         this.m_OnMessage((object)this, new AVMessageReceivedEventArgs()
         {
             Message = e.Message
         });
     if (this.AVSessionListener == null)
         return;
     this.AVSessionListener.OnMessage(this, e.Message);
 }
 private void rtc_OnSessionChanged(object sender, AVIMEventArgs e)
 {
     AVSessionOp sessionOp = e.SessionOp;
     Action<AVSessionOp> action = new Action<AVSessionOp>[4]
     {
 new Action<AVSessionOp>(this.SessionOp_Open),
 new Action<AVSessionOp>(this.SessionOp_Added),
 new Action<AVSessionOp>(this.SessionOp_Removed),
 new Action<AVSessionOp>(this.SessionOp_Closed)
     }[Array.IndexOf<string>(new string[4]
     {
 "opened",
 "added",
 "removed",
 "closed"
     }, sessionOp.op)];
     if (action == null)
         return;
     action(sessionOp);
 }
 private void rtc_OnMessageSent(object sender, AVIMEventArgs e)
 {
     lock (this.mutex)
     {
         AVMessage local_1 = this.pendingMeaasge[e.Ack.MsgId];
         if (this.m_OnMessageSent != null)
             this.m_OnMessageSent((object)this, new AVMessageSentEventArgs()
             {
                 Message = local_1
             });
         if (this.AVSessionListener == null || this.AVSessionListener.OnMessageSent == null)
             return;
         this.AVSessionListener.OnMessageSent(this, local_1);
     }
 }
 private void rtc_OnPresenceChanged(object sender, AVIMEventArgs e)
 {
     string[] array = new string[2]
     {
 "on",
 "off"
     };
     StatusChanged[] statusChangedArray = new StatusChanged[2]
     {
 new StatusChanged(this.OnPeerOnline),
 new StatusChanged(this.OnPeerOffline)
     };
     int index = Array.IndexOf<string>(array, e.Presence.Status);
     if (index <= -1)
         return;
     statusChangedArray[index](this, e.Presence.SessionPeerIds);
 }
 private void rtc_OnGroupAction(object sender, AVIMEventArgs e)
 {
     this.m_OnGroupAction((object)this, new AVRtcGroupEventArgs()
     {
         GroupOp = e.GroupOp
     });
 }