/// <summary>
 /// Adds all items from another <c>ViewInfosByTaskCollection</c>
 /// collection to this one.
 /// </summary>
 #endregion
 public void Add(ViewInfosByTaskCollection viewInfBTColl)
 {
     foreach (Type t in viewInfBTColl)
     {
         if (this[t] == null)
         {
             this[t] = viewInfBTColl[t];
         }
         else
         {
             this[t].Add(viewInfBTColl[t]);
         }
     }
 }
        /// <summary>
        /// Generates <see cref="ViewInfo"/> objects from <see cref="ViewAttribute"/> attributes
        /// found in the given assembly.
        /// </summary>
        #endregion
        public ViewInfosByTaskCollection GetFromAssembly(Assembly assembly)
        {
            ViewInfosByTaskCollection result = new ViewInfosByTaskCollection();

            foreach (Type t in assembly.GetTypes())
            {
                foreach (ViewAttribute viewAttr in t.GetCustomAttributes(typeof(ViewAttribute), false))
                {
                    if (result[viewAttr.TaskType] == null)
                    {
                        result[viewAttr.TaskType] = new ViewInfoCollection();
                    }
                    result[viewAttr.TaskType].Add(newViewInfo(t, viewAttr));
                }
            }
            return(result);
        }