/// <summary>
 /// Adds new description to collection
 /// </summary>
 /// <param name="aAttr">
 /// Description <see cref="DevelopmentInformationAttribute"/>
 /// </param>
 private void Add(DevelopmentInformationAttribute aAttr)
 {
     if (aAttr == null)
     {
         return;
     }
     if (descriptions == null)
     {
         descriptions = new List <DevelopmentInformationAttribute>();
     }
     descriptions.Add(aAttr);
 }
Exemple #2
0
        public DevelopmentInformationAttribute[] GetDevelopmentInformations(Type aType)
        {
            ArrayList res = new ArrayList();

            Attribute[] attrs = (Attribute[])aType.GetCustomAttributes(false);
            foreach (Attribute attr in attrs)
            {
                if (TypeValidator.IsCompatible(attr.GetType(), typeof(DevelopmentInformationAttribute)) == true)
                {
                    res.Add(attr);
                }
            }
            DevelopmentInformationAttribute[] arr = new DevelopmentInformationAttribute[res.Count];
            for (int i = 0; i < Count; i++)
            {
                arr[i] = (DevelopmentInformationAttribute)res[i];
            }
            res.Clear();
            res = null;
            return(arr);
        }