示例#1
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);
        }