System.Runtime.Remoting.Contexts.IContextAttribute Interface

Assembly: Mscorlib.dll
Namespace: System.Runtime.Remoting.Contexts
This type supports the Shared Source CLI infrastructure and is not intended to be used directly from your code.
Summary
Identifies a context attribute.
C# Syntax:
public interface IContextAttribute
Remarks
An IContextAttribute is exposed from all context attributes. The attributes contribute a property which resides in a context and enforces a specific policy for the objects created in that context. For more information about using attributes, see the conceptual topic at MSDN: extendingmetadatausingattributes.
See also:
System.Runtime.Remoting.Contexts Namespace

System.Runtime.Remoting.Contexts.IContextAttribute Member List:

Public Methods
GetPropertiesForNewContext Returns context properties to the caller in the given IConstructionCallMessage.
IsContextOK Returns a Boolean value indicating whether the specified Context meets the context attribute's requirements.

System.Runtime.Remoting.Contexts.IContextAttribute Member Details

Method: GetPropertiesForNewContext(
   IConstructionCallMessage msg
)
Summary
Returns context properties to the caller in the given IConstructionCallMessage.
This type supports the Shared Source CLI infrastructure and is not intended to be used directly from your code.
C# Syntax:
void GetPropertiesForNewContext(
   IConstructionCallMessage msg
);
Parameters:

msg

The IConstructionCallMessage to which to add the context properties.

Remarks
The attribute can add context properties directly to the IConstructionCallMessage.ContextProperties list in the IConstructionCallMessage. The default implementation in the ContextAttribute class will add this to the context property list. Context attributes are free to override IContextAttribute.GetPropertiesForNewContext and can implement their own behaviour - for example they can add to the list a new class that implements the context property.

Return to top


Method: IsContextOK(
   Context ctx,
   IConstructionCallMessage msg
)
Summary
Returns a Boolean value indicating whether the specified Context meets the context attribute's requirements.
This type supports the Shared Source CLI infrastructure and is not intended to be used directly from your code.
C# Syntax:
bool IsContextOK(
   Context ctx,
   IConstructionCallMessage msg
);
Parameters:

ctx

The context to check against the current context attribute.

msg

The construction call, parameters of which need to be checked against the current context.

Return Value:
true if the passed in context is OK; otherwise, false.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.