Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="setting"></param>
        /// <param name="defaultWidth"></param>
        /// <returns></returns>
        internal static IDictionary <TraceEventFieldIndex, TraceEventField> GetAllFields(TraceEventListSetting setting, int defaultWidth)
        {
            TraceEventAccessor accessor = new TraceEventAccessor(setting);

            Array enumFields = Enum.GetValues(typeof(TraceEventFieldIndex));

            Dictionary <TraceEventFieldIndex, TraceEventField> fields = new Dictionary <TraceEventFieldIndex, TraceEventField>(enumFields.Length);

            for (int i = 0; i < enumFields.Length; ++i)
            {
                TraceEventFieldIndex enumField = (TraceEventFieldIndex)enumFields.GetValue(i);

                fields.Add(enumField, new TraceEventField(enumField, defaultWidth, accessor));
            }

            return(fields);
        }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="index"></param>
 /// <param name="width"></param>
 /// <param name="accessor"></param>
 private TraceEventField(TraceEventFieldIndex index, int width, TraceEventAccessor accessor)
 {
     m_Index  = index;
     m_Getter = accessor.GetFieldAccessor(index);
     m_Width  = width;
 }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="traceEvent"></param>
 /// <returns></returns>
 public object GetValue(TraceEvent traceEvent)
 {
     return(TraceEventAccessor.GetPayloadValue(traceEvent, m_Name));
 }