Rediger

Del via


ContextAttribute Class

Definition

Provides the default implementations of the IContextAttribute and IContextProperty interfaces.

This API supports the product infrastructure and is not intended to be used directly from your code.

public ref class ContextAttribute : Attribute, System::Runtime::Remoting::Contexts::IContextAttribute, System::Runtime::Remoting::Contexts::IContextProperty
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Serializable]
public class ContextAttribute : Attribute, System.Runtime.Remoting.Contexts.IContextAttribute, System.Runtime.Remoting.Contexts.IContextProperty
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class ContextAttribute : Attribute, System.Runtime.Remoting.Contexts.IContextAttribute, System.Runtime.Remoting.Contexts.IContextProperty
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
public class ContextAttribute : Attribute, System.Runtime.Remoting.Contexts.IContextAttribute, System.Runtime.Remoting.Contexts.IContextProperty
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Serializable>]
type ContextAttribute = class
    inherit Attribute
    interface IContextAttribute
    interface IContextProperty
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ContextAttribute = class
    inherit Attribute
    interface IContextAttribute
    interface IContextProperty
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Security.SecurityCritical>]
type ContextAttribute = class
    inherit Attribute
    interface IContextAttribute
    interface IContextProperty
Public Class ContextAttribute
Inherits Attribute
Implements IContextAttribute, IContextProperty
Inheritance
ContextAttribute
Derived
Attributes
Implements

Remarks

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 Attributes.

Notes to Inheritors

The Name property must not be overridden in any user derived class. The current Equals(Object) 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(Object) and GetHashCode() methods.

Constructors

ContextAttribute(String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Creates an instance of the ContextAttribute class with the specified name.

Fields

AttributeName

This API supports the product infrastructure and is not intended to be used directly from your code.

Indicates the name of the context attribute.

Properties

Name

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets the name of the context attribute.

TypeId

When implemented in a derived class, gets a unique identifier for this Attribute.

(Inherited from Attribute)

Methods

Equals(Object)

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns a Boolean value indicating whether this instance is equal to the specified object.

Freeze(Context)

This API supports the product infrastructure and is not intended to be used directly from your code.

Called when the context is frozen.

GetHashCode()

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns the hashcode for this instance of ContextAttribute.

GetPropertiesForNewContext(IConstructionCallMessage)

This API supports the product infrastructure and is not intended to be used directly from your code.

Adds the current context property to the given message.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
IsContextOK(Context, IConstructionCallMessage)

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns a Boolean value indicating whether the context parameter meets the context attribute's requirements.

IsDefaultAttribute()

When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

(Inherited from Attribute)
IsNewContextOK(Context)

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns a Boolean value indicating whether the context property is compatible with the new context.

Match(Object)

When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Inherited from Attribute)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Retrieves the type information for an object, which can be used to get the type information for an interface.

(Inherited from Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Provides access to properties and methods exposed by an object.

(Inherited from Attribute)

Applies to