Пример #1
0
 public void Add(ViewInfosByTaskCollection viewInfBTColl)
 {
     foreach (Type t in viewInfBTColl)
         if (this[t] == null)
             this[t] = viewInfBTColl[t];
         else
             this[t].Add(viewInfBTColl[t]);
 }
Пример #2
0
 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;
 }
Пример #3
0
 public ViewInfosByTaskCollection GetFromAssembly(Assembly assembly)
 {
     ViewInfosByTaskCollection result = new ViewInfosByTaskCollection();
     foreach (Type t in assembly.GetTypes())
         foreach (WebformsViewAttribute viewAttr in t.GetCustomAttributes(typeof(WebformsViewAttribute), false))
         {
             if (result[viewAttr.TaskType] == null)
                 result[viewAttr.TaskType] = new WebformsViewInfoCollection();
             (result[viewAttr.TaskType] as WebformsViewInfoCollection).Add(
                     new WebformsViewInfo(viewAttr.ViewName, viewAttr.ViewUrl));
         }
     return result;
 }
Пример #4
0
        /// <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][viewAttr.ViewName] = newViewInfo(t, viewAttr);
                }
            }
            return(result);
        }
Пример #5
0
 public ViewInfosByTaskCollection GetFromAssembly(Assembly assembly)
 {
     ViewInfosByTaskCollection result = new ViewInfosByTaskCollection();
     result[typeof(int)] = new ViewInfoCollection();
     if (assembly == inputAssembly1)
         result[typeof(int)].Add(vi1);
     else if (assembly == inputAssembly2)
         result[typeof(int)].Add(vi2);
     else if (assembly == inputAssembly3)
         result[typeof(int)].Add(vi3);
     return result;
 }
Пример #6
0
 public ViewInfosByTaskCollection GetFromAssembly(Assembly assembly)
 {
     ViewInfosByTaskCollection result = new ViewInfosByTaskCollection();
     result[typeof(StubTask)] = returnedViewInfoColl;
     return result;
 }
 public void TestSetup()
 {
     vibtColl = new ViewInfosByTaskCollection();
     vibtColl[typeof(int)] = new ViewInfoCollection();
     vibtColl[typeof(string)] = new ViewInfoCollection();
 }