Пример #1
0
 // Methods
 public PmcCategory()
 {
     m_Name = string.Empty;
       m_DisplayName = string.Empty;
       m_Help = string.Empty;
       m_Counters = new PmcCounters();
       m_CounterInstances = new ImplicitCounterInstances();
       foreach (
     PmcCategoryGeneralAttribute attribute1 in
       base.GetType().GetCustomAttributes(typeof (PmcCategoryGeneralAttribute), false))
       {
     if (attribute1 is PmcCategoryNameAttribute)
     {
       m_Name = (string) attribute1.Value;
       m_DisplayName = m_Name;
     }
     else if (attribute1 is PmcCategoryHelpAttribute)
     {
       m_Help = (string) attribute1.Value;
     }
       }
       if (m_Name.Trim() == "")
       {
     throw new InvalidOperationException("PMC category name not set");
       }
 }
Пример #2
0
 internal PmcCategory(string Name, string Help, string DisplayName)
 {
     m_Name = string.Empty;
       m_DisplayName = string.Empty;
       m_Help = string.Empty;
       m_Counters = new PmcCounters();
       m_CounterInstances = new ImplicitCounterInstances();
       m_Name = Name;
       m_Help = Help;
       m_DisplayName = DisplayName;
 }