예제 #1
0
 public static void AddEasMessageDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, int messageCount, bool hasUnicode, int recipientNumber, bool isFromOutlook)
 {
     if (instance.Enabled)
     {
         SMSSendingClient smssendingClient;
         if (isFromOutlook)
         {
             smssendingClient = SMSSendingClient.Outlook;
         }
         else
         {
             smssendingClient = SMSSendingClient.OWA;
         }
         string deploymentType = SmsSqmDataPointHelper.GetDeploymentType(id);
         string text           = SmsSqmDataPointHelper.Generate64BitUserID(legacyDN);
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_EASMESSAGES, new object[]
         {
             deploymentType,
             text,
             messageCount,
             hasUnicode,
             recipientNumber,
             (int)smssendingClient
         });
     }
 }
예제 #2
0
 public static void AddNdrDataPoint(SmsSqmSession instance, SMSNotificationType messageType, bool isEASMessage, bool isVoicemailMessage, bool isRuleAlertMessage, bool isSystemMessage, string errorMessage)
 {
     if (instance.Enabled)
     {
         int num;
         if (isVoicemailMessage)
         {
             num = 20;
         }
         else if (isRuleAlertMessage)
         {
             num = 10;
         }
         else if (isSystemMessage)
         {
             num = 40;
         }
         else if (isEASMessage)
         {
             num = 101;
         }
         else
         {
             num = (int)messageType;
         }
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_NDRS, new object[]
         {
             num,
             errorMessage.Substring(0, Math.Min(50, errorMessage.Length))
         });
     }
 }
예제 #3
0
 public static void AddDeviceInfoReceivedDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, string deviceType, string versionString)
 {
     if (instance.Enabled)
     {
         string deploymentType = SmsSqmDataPointHelper.GetDeploymentType(id);
         string text           = SmsSqmDataPointHelper.Generate64BitUserID(legacyDN);
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_EASESTABLISHMENT, new object[]
         {
             deploymentType,
             text,
             deviceType,
             versionString
         });
     }
 }
예제 #4
0
 public static void AddEasConfigurationDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, string deviceType, bool notificationEnabled, string versionString)
 {
     if (instance.Enabled)
     {
         string deploymentType = SmsSqmDataPointHelper.GetDeploymentType(id);
         string text           = SmsSqmDataPointHelper.Generate64BitUserID(legacyDN);
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_EASCONFIGURATION, new object[]
         {
             deploymentType,
             text,
             deviceType,
             notificationEnabled,
             versionString
         });
     }
 }
예제 #5
0
 public static void AddNotificationTurningOnDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, TextMessagingAccount account)
 {
     if (instance.Enabled)
     {
         string     deploymentType = SmsSqmDataPointHelper.GetDeploymentType(id);
         string     text           = SmsSqmDataPointHelper.Generate64BitUserID(legacyDN);
         RegionInfo regionInfo     = (RegionInfo)account[TextMessagingAccountSchema.CountryRegionId];
         int        num            = (int)account[TextMessagingAccountSchema.MobileOperatorId];
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_NOTIFICATIONTURNINGON, new object[]
         {
             deploymentType,
             text,
             regionInfo.ToString(),
             num
         });
     }
 }
예제 #6
0
 public static void AddNotificationConfigDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, CalendarNotification calendarNotification)
 {
     if (instance.Enabled)
     {
         if (calendarNotification.CalendarUpdateNotification)
         {
             SmsSqmDataPointHelper.AddNotificationConfigDataPoint(instance, id, legacyDN, SMSNotificationType.CalendarUpdate);
         }
         if (calendarNotification.MeetingReminderNotification)
         {
             SmsSqmDataPointHelper.AddNotificationConfigDataPoint(instance, id, legacyDN, SMSNotificationType.CalendarReminder);
         }
         if (calendarNotification.DailyAgendaNotification)
         {
             SmsSqmDataPointHelper.AddNotificationConfigDataPoint(instance, id, legacyDN, SMSNotificationType.CalendarAgenda);
         }
     }
 }
예제 #7
0
 public static void AddNotificationConfigDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, SMSNotificationType notificationType)
 {
     if (notificationType == SMSNotificationType.None)
     {
         return;
     }
     if (instance.Enabled)
     {
         string deploymentType = SmsSqmDataPointHelper.GetDeploymentType(id);
         string text           = SmsSqmDataPointHelper.Generate64BitUserID(legacyDN);
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_NOTIFICATIONCONFIGURATION, new object[]
         {
             deploymentType,
             text,
             (int)notificationType
         });
     }
 }
예제 #8
0
 public static void AddNotificationMessageDataPoint(SmsSqmSession instance, ADObjectId id, string legacyDN, SMSNotificationType messageType, bool isVoicemailMessage, bool isRuleAlertMessage, bool isSystemMessage, int messageCount, string carrier, string region)
 {
     if (instance.Enabled)
     {
         string deploymentType = SmsSqmDataPointHelper.GetDeploymentType(id);
         string text           = SmsSqmDataPointHelper.Generate64BitUserID(legacyDN);
         if (messageType == SMSNotificationType.None)
         {
             if (isVoicemailMessage)
             {
                 messageType = SMSNotificationType.VoiceMail;
             }
             else if (isRuleAlertMessage)
             {
                 messageType = SMSNotificationType.Email;
             }
             else
             {
                 if (!isSystemMessage)
                 {
                     return;
                 }
                 messageType = SMSNotificationType.System;
             }
         }
         instance.AddToStreamDataPoint(SqmDataID.SMS_ST_NOTIFICATIONMESSAGE, new object[]
         {
             deploymentType,
             text,
             (int)messageType,
             messageCount,
             Convert.ToInt32(carrier),
             region
         });
     }
 }