using System; using System.Runtime.InteropServices; using System.Runtime.Remoting.Activation; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Contexts; namespace System.Runtime.Remoting.Proxies { /// Indicates that an object type requires a custom proxy. // Token: 0x02000431 RID: 1073 [AttributeUsage(AttributeTargets.Class)] [ComVisible(true)] public class ProxyAttribute : Attribute, IContextAttribute { /// Creates either an uninitialized or a transparent proxy, depending on whether the specified type can exist in the current context. /// An uninitialized or a transparent proxy. /// The object type to create an instance of. /// /// /// /// /// // Token: 0x0600297D RID: 10621 RVA: 0x00085504 File Offset: 0x00083704 public virtual MarshalByRefObject CreateInstance(Type serverType) { RemotingProxy remotingProxy = new RemotingProxy(serverType, ChannelServices.CrossContextUrl, null); return (MarshalByRefObject)remotingProxy.GetTransparentProxy(); } /// Creates an instance of a remoting proxy for a remote object described by the specified , and located on the server. /// The new instance of remoting proxy for the remote object that is described in the specified . /// The object reference to the remote object for which to create a proxy. /// The type of the server where the remote object is located. /// The server object. /// The context in which the server object is located. /// /// /// // Token: 0x0600297E RID: 10622 RVA: 0x0008552C File Offset: 0x0008372C public virtual RealProxy CreateProxy(ObjRef objRef, Type serverType, object serverObject, Context serverContext) { return RemotingServices.GetRealProxy(RemotingServices.GetProxyForRemoteObject(objRef, serverType)); } /// Gets properties for a new context. /// /// /// // Token: 0x0600297F RID: 10623 RVA: 0x0008553C File Offset: 0x0008373C [ComVisible(true)] public void GetPropertiesForNewContext(IConstructionCallMessage msg) { } /// Checks the specified context. /// /// /// // Token: 0x06002980 RID: 10624 RVA: 0x00085540 File Offset: 0x00083740 [ComVisible(true)] public bool IsContextOK(Context ctx, IConstructionCallMessage msg) { return true; } } }