QuickOPC User's Guide and Reference
BaseTypeRequiredAttribute Class
Members  Example 



OpcLabs.BaseLib Assembly > JetBrains.Annotations Namespace : BaseTypeRequiredAttribute Class
When applied to target attribute, specifies a requirement for any type which is marked with target attribute to implement or inherit specific type or types
Syntax
'Declaration
 
<AttributeUsageAttribute(ValidOn=AttributeTargets.Class, 
   AllowMultiple=True, 
   Inherited=True)>
<BaseTypeRequiredAttribute(System.Type[])>
<ComVisibleAttribute(False)>
Public NotInheritable Class BaseTypeRequiredAttribute 
   Inherits System.Attribute
   Implements System.Runtime.InteropServices._Attribute 
'Usage
 
Dim instance As BaseTypeRequiredAttribute
[AttributeUsage(ValidOn=AttributeTargets.Class, 
   AllowMultiple=true, 
   Inherited=true)]
[BaseTypeRequired(System.Type[])]
[ComVisible(false)]
public sealed class BaseTypeRequiredAttribute : System.Attribute, System.Runtime.InteropServices._Attribute  
[AttributeUsage(ValidOn=AttributeTargets.Class, 
   AllowMultiple=true, 
   Inherited=true)]
[BaseTypeRequired(System.Type[])]
[ComVisible(false)]
public ref class BaseTypeRequiredAttribute sealed : public System.Attribute, System.Runtime.InteropServices._Attribute  
Example
[BaseTypeRequired(typeof(IComponent)] // Specify requirement
public class ComponentAttribute : Attribute 
{}
            
[Component] // ComponentAttribute requires implementing IComponent interface
public class MyComponent : IComponent
{}
Inheritance Hierarchy

System.Object
   System.Attribute
      JetBrains.Annotations.BaseTypeRequiredAttribute

Requirements

Target Platforms: Windows 7 with SP1, Windows Server 2008 R2 with SP1

See Also

Reference

BaseTypeRequiredAttribute Members
JetBrains.Annotations Namespace