Export (0) Print
Expand All

ContextAttribute Class

This class supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Provides the default implementations of the IContextAttribute and IContextProperty interfaces.

Namespace: System.Runtime.Remoting.Contexts
Assembly: mscorlib (in mscorlib.dll)

[SerializableAttribute] 
[AttributeUsageAttribute(AttributeTargets.Class)] 
[ComVisibleAttribute(true)] 
public class ContextAttribute : Attribute, IContextAttribute, IContextProperty
/** @attribute SerializableAttribute() */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Class) */ 
/** @attribute ComVisibleAttribute(true) */ 
public class ContextAttribute extends Attribute implements IContextAttribute, IContextProperty
SerializableAttribute 
AttributeUsageAttribute(AttributeTargets.Class) 
ComVisibleAttribute(true) 
public class ContextAttribute extends Attribute implements IContextAttribute, IContextProperty
Not applicable.

The ContextAttribute class is the root for all context attributes. Simple Context class properties can be derived from ContextAttribute with the context attribute and the context property being in the class. For more specialized or more sophisticated needs, the context attribute can derive from ContextAttribute and the context property can be split into a separated class. For more information about using attributes, see Extending Metadata Using Attributes.

Notes to Inheritors: The Name property must not be overridden in any user derived class. The current Equals and GetHashCode methods depend on the default functionality. To provide advanced behavior for a class extending the ContextAttribute class and override the Name property, you also have to override the default implementation of the Equals and GetHashCode methods.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2015 Microsoft