// Token: 0x06000AFF RID: 2815 RVA: 0x0004DD44 File Offset: 0x0004BF44 internal static void GenerateMessageNotDeliveredPayload(InstantMessagePayload payload, string methodName, int conversationId, Exception exception) { string arg = string.Empty; if (exception != null && exception.Message != null) { arg = exception.Message; } ExTraceGlobals.InstantMessagingTracer.TraceError <string, string>(0L, "{0} failed. {1}", methodName, arg); InstantMessagePayloadUtilities.GenerateMessageNotDeliveredPayload(payload, conversationId.ToString(CultureInfo.InvariantCulture)); }
private void SendMessageCallback(IAsyncResult result) { IIMModality iimmodality = null; try { ExTraceGlobals.InstantMessagingTracer.TraceDebug((long)this.GetHashCode(), "InstantMessageQueue.SendMessageCallback"); iimmodality = (result.AsyncState as IIMModality); if (iimmodality == null) { ExTraceGlobals.InstantMessagingTracer.TraceError((long)this.GetHashCode(), "InstantMessageQueue.SendMessageCallback. Instant Messaging Modality is null."); } else { iimmodality.EndSendMessage(result); } } catch (InstantMessagingException ex) { InstantMessagePayloadUtilities.GenerateMessageNotDeliveredPayload(this.payload, "InstantMessageQueue.SendMessageCallback", (iimmodality == null || iimmodality.Conversation == null) ? 0 : iimmodality.Conversation.Cid, ex); InstantMessagingError code = ex.Code; if (code <= 18102) { if (code == 0) { goto IL_DB; } if (code == 18102) { InstantMessagingErrorSubCode subCode = ex.SubCode; if (subCode != 9) { InstantMessageUtilities.SendWatsonReport("InstantMessageQueue.SendMessageCallback", this.userContext, ex); goto IL_DB; } goto IL_DB; } } else if (code == 18201 || code == 18204) { goto IL_DB; } InstantMessageUtilities.SendWatsonReport("InstantMessageQueue.SendMessageCallback", this.userContext, ex); IL_DB :; } catch (Exception exception) { InstantMessageUtilities.SendWatsonReport("InstantMessageQueue.SendMessageCallback", this.userContext, exception); } }
public void AddMessage(string contentType, string message) { ExTraceGlobals.InstantMessagingTracer.TraceDebug((long)this.GetHashCode(), "InstantMessageQueue.AddMessage"); Interlocked.CompareExchange <List <InstantMessageChat> >(ref this.messageList, new List <InstantMessageChat>(), null); bool flag = false; lock (this.lockObject) { if (this.messageList.Count < 20) { this.messageList.Add(new InstantMessageChat("text/plain;charset=utf-8", message)); } else { flag = true; } } if (flag) { ExTraceGlobals.InstantMessagingTracer.TraceError <int>((long)this.GetHashCode(), "InstantMessageQueue.AddMessage. Message queued count: {0}", this.messageList.Count); InstantMessagePayloadUtilities.GenerateMessageNotDeliveredPayload(this.payload, this.conversation.Cid.ToString(CultureInfo.InvariantCulture)); } }
// Token: 0x06000AFD RID: 2813 RVA: 0x0004DC94 File Offset: 0x0004BE94 internal static void GenerateMessageNotDeliveredPayload(InstantMessagePayload payload, string chatId) { InstantMessagePayloadUtilities.GenerateMessageNotDeliveredPayload(payload, chatId, false); }