public void Can_add_attributes_at_runtime_to_BaseAttribute() { TypeDescriptor.AddAttributes(typeof(RuntimeManyBaseAttr), new BaseAttribute("b3")); var o = new RuntimeManyBaseAttr(); Assert.That(o.GetType().AllAttributes <BaseAttribute>().Length, Is.EqualTo(3)); Assert.That(o.GetType().AllAttributes <IBaseAttribute>().Length, Is.EqualTo(3)); }
public void Can_add_attributes_at_runtime_to_BaseAttribute() { typeof(RuntimeManyBaseAttr).AddAttributes(new BaseAttribute("b3")); var o = new RuntimeManyBaseAttr(); Assert.That(o.GetType().AllAttributes <BaseAttribute>().Length, Is.EqualTo(3)); #if !NETCORE Assert.That(o.GetType().AllAttributes <IBaseAttribute>().Length, Is.EqualTo(3)); #endif }
public void Can_add_attributes_at_runtime_to_BaseAttribute() { typeof(RuntimeManyBaseAttr).AddAttributes(new BaseAttribute("b3")); var o = new RuntimeManyBaseAttr(); Assert.That(o.GetType().AllAttributes<BaseAttribute>().Length, Is.EqualTo(3)); Assert.That(o.GetType().AllAttributes<IBaseAttribute>().Length, Is.EqualTo(3)); }