Пример #1
0
        // Token: 0x06002544 RID: 9540 RVA: 0x00086D20 File Offset: 0x00084F20
        protected override ICollection <KeyValuePair <string, object> > GetComponentSpecificData(IActivityScope activityScope, string eventId)
        {
            Dictionary <string, object> dictionary = new Dictionary <string, object>(20);
            IEnumerable <KeyValuePair <string, object> > formattableMetadata = activityScope.GetFormattableMetadata(OwsLogRegistry.GetRegisteredValues(eventId));

            foreach (KeyValuePair <string, object> keyValuePair in formattableMetadata)
            {
                dictionary.Add(keyValuePair.Key, keyValuePair.Value);
            }
            ExtensibleLogger.CopyPIIProperty(activityScope, dictionary, OwaServerLogger.LoggerData.PrimarySmtpAddress, "PSA");
            ExtensibleLogger.CopyPIIProperty(activityScope, dictionary, OwaServerLogger.LoggerData.User, "user");
            ExtensibleLogger.CopyProperties(activityScope, dictionary, OwaServerLogger.EnumToShortKeyMapping);
            if (Globals.LogErrorDetails)
            {
                ExtensibleLogger.CopyProperty(activityScope, dictionary, ServiceCommonMetadata.GenericErrors, "ErrInfo");
                string property = activityScope.GetProperty(ServiceCommonMetadata.ErrorCode);
                if ((!string.IsNullOrEmpty(activityScope.GetProperty(ServiceCommonMetadata.GenericErrors)) || (!string.IsNullOrEmpty(property) && property != "Success" && property != "0")) && HttpContext.Current != null)
                {
                    string key = OwaServerLogger.EnumToShortKeyMapping[OwaServerLogger.LoggerData.UserAgent];
                    if (!dictionary.ContainsKey(key))
                    {
                        dictionary.Add(key, HttpContext.Current.Request.UserAgent);
                    }
                }
            }
            return(dictionary);
        }
Пример #2
0
        protected virtual List <KeyValuePair <string, object> > FormatWlmActivity(IActivityScope activityScope)
        {
            List <KeyValuePair <string, object> > list = null;

            if (activityScope != null)
            {
                list = activityScope.GetFormattableStatistics();
                List <KeyValuePair <string, object> > formattableMetadata = activityScope.GetFormattableMetadata();
                if (formattableMetadata != null)
                {
                    foreach (KeyValuePair <string, object> item in formattableMetadata)
                    {
                        if (item.Key.StartsWith("WLM"))
                        {
                            list.Add(item);
                        }
                    }
                }
            }
            return(list);
        }
        internal static List <KeyValuePair <string, object> > FormatWlmActivity(IActivityScope activityScope, bool includeMetaData = true)
        {
            List <KeyValuePair <string, object> > list = null;

            if (activityScope != null)
            {
                list = activityScope.GetFormattableStatistics();
                if (includeMetaData)
                {
                    List <KeyValuePair <string, object> > formattableMetadata = activityScope.GetFormattableMetadata();
                    if (formattableMetadata != null)
                    {
                        foreach (KeyValuePair <string, object> item in formattableMetadata)
                        {
                            if (!item.Key.StartsWith("ActivityStandardMetadata"))
                            {
                                list.Add(item);
                            }
                        }
                    }
                }
            }
            return(list);
        }