Exemple #1
0
        public void AddEvent(TraceEvent @event)
        {
            if (@event == null)
            {
                throw new ArgumentNullException("event");
            }

            TracePivotRowCollection rows = Rows;

            for (int i = 0; i < RowSettings.Count; i++)
            {
                var setting = RowSettings[i];

                if (setting.Type == RowType.EventName)
                {
                    TracePivotRow row;
                    if (rows.TryGetValue(@event.Name, out row) == false)
                    {
                        row = new TracePivotRow(this, setting, @event.Name, null);
                        rows.Add(row);
                    }

                    foreach (var column in Columns)
                    {
                        if (column.Value.Settings.Filter.Type == FilterType.EventName)
                        {
                            var eventName = column.Value.Settings.Filter.EventName;
                            row[column.Key].Measure.AddRange(@event.ByName(eventName));
                        }
                    }
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// Добавить строку
 /// </summary>
 /// <param name="child"></param>
 public void AddRow(TracePivotRow child)
 {
     if (child == null)
     {
         throw new ArgumentNullException("child");
     }
     _childs.Add(child);
 }