protected override ViewInfo newViewInfo(Type viewType, ViewAttribute viewAttr) { if (viewAttr is StubViewAttribute) return specialViewInf = new ViewInfo( (viewAttr as StubViewAttribute).StubViewProperty, typeof(int)); else return base.newViewInfo(viewType, viewAttr); }
public void TestAdd() { ViewInfo vi = new ViewInfo("C", typeof(bool)); viColl.Add(vi); Assert.AreSame(vi, viColl["C"]); }
public void TestAddColl() { ViewInfoCollection viColl2 = new ViewInfoCollection(); viColl2["D"] = new ViewInfo("D", typeof(decimal)); viColl2["E"] = new ViewInfo("E", typeof(long)); viColl.Add(viColl2); Assert.AreEqual(4, viColl.Count); Assert.AreSame(viColl2["D"], viColl["D"]); Assert.AreSame(viColl2["E"], viColl["E"]); }
public void TestSetup() { viColl = new ViewInfoCollection(); viColl["A"] = new ViewInfo("A", typeof(int)); viColl["B"] = new ViewInfo("B", typeof(string)); }
public virtual void Add(ViewInfo viewInf) { this[viewInf.ViewName] = viewInf; }
public override void Add(ViewInfo viewInf) { this.Add(viewInf as WebformsViewInfo); }