System.Runtime.Remoting.Proxies.ProxyAttribute Class

Indicates that an object type requires a custom proxy.

See Also: ProxyAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Runtime.InteropServices.ComVisible(true)]
public class ProxyAttribute : Attribute, System.Runtime.Remoting.Contexts.IContextAttribute

Remarks

Apply the current attribute to types that need custom proxies. You can use the ProxyAttribute class to intercept the new (New in Visual Basic) statement by deriving from the ProxyAttribute and placing the attribute on a child of ContextBoundObject. (Placing the proxy attribute on a child of MarshalByRefObject is not supported.)

Note:

This class makes a link demand and an inheritance demand at the class level. A System.Security.SecurityException is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [<topic://cpconLinkDemands>] and [<topic://cpconInheritanceDemands>].

Requirements

Namespace: System.Runtime.Remoting.Proxies
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0