public OtherCtorAttributeImpl(OtherCtorAttribute a, ITypeAttributesCache owner) { _attribute = a ?? throw new ArgumentNullException(nameof(a)); Constructed = true; owner.Type.Should().Be(typeof(S5)); owner.GetAllCustomAttributes <IAttributeTypeSample>().Should().BeEmpty("In the constructor, no attribute are available."); }
void IAttributeContextBoundInitializer.Initialize(IActivityMonitor monitor, ITypeAttributesCache owner, MemberInfo m) { Initialized = true; owner.GetAllCustomAttributes <IAttributeTypeSample>().Should().HaveCount(2, "In the IAttributeContextBoundInitializer.Initialize, other attributes are available!"); }