{
return GetType (host, an, tn, r);
}
-#if NET_2_0
public object Filter (string propertyName, object value)
{
return FilterPropertyValue (propertyName, value);
{
return ValidatePropertyValue (propertyName, value);
}
-#endif
}
[TestFixtureSetUp]
Assert.AreEqual (typeof (ToolboxItemFilterAttribute[]), item.Filter.GetType (), "Filter/Type");
Assert.AreEqual (0, item.Filter.Count, "Filter");
Assert.AreEqual (String.Empty, item.TypeName, "TypeName");
-#if NET_2_0
Assert.IsNull (item.Company, "Company");
Assert.AreEqual (".NET Component", item.ComponentType, "ComponentType");
Assert.IsNull (item.DependentAssemblies, "DependentAssemblies");
Assert.IsFalse (item.IsTransient, "IsTransient");
Assert.AreEqual (0, item.Properties.Count, "Properties");
Assert.AreEqual (String.Empty, item.Version, "Version");
-#endif
}
[Test]
Assert.AreEqual (0, item.Filter.Count, "Filter");
item.TypeName = null;
Assert.AreEqual (String.Empty, item.TypeName, "TypeName");
-#if NET_2_0
item.Company = null;
Assert.AreEqual (String.Empty, item.Company, "Company");
// can't assign null without a NRE
Assert.AreEqual (9, item.Properties.Count, "Properties");
item.Lock ();
Assert.AreEqual (9, item.Properties.Count, "Properties/Lock");
-#endif
}
[Test]
item.Lock ();
}
-#if NET_2_0
[Test]
public void TestNewProperties ()
{
// only documented case
new OurToolboxItem ()._ValidatePropertyValue ("IsTransient", new object ());
}
-#endif
}
}