Merge pull request #214 from QuickJack/cd2c570c5543963d987f51080218715407c5d4b9
[mono.git] / mcs / class / corlib / System.Runtime.Remoting.Proxies / ProxyAttribute.cs
index 10804a6ec2ea2c4ac572e01095ff5245c0db87e2..4bc4d567d20ef77c8f8c28393163c0b757948423 100644 (file)
@@ -35,9 +35,12 @@ using System.Runtime.Remoting.Activation;
 using System.Runtime.Remoting.Contexts;
 using System.Runtime.Remoting.Channels;
 
+using System.Runtime.InteropServices;
+
 namespace System.Runtime.Remoting.Proxies {
 
        [AttributeUsage (AttributeTargets.Class)]
+       [ComVisible (true)]
        public class ProxyAttribute : Attribute, IContextAttribute
        {
                public ProxyAttribute ()
@@ -46,20 +49,26 @@ namespace System.Runtime.Remoting.Proxies {
 
                public virtual MarshalByRefObject CreateInstance (Type serverType)
                {
+#if MOONLIGHT
+                       throw new NotImplementedException ();
+#else
                        RemotingProxy proxy = new RemotingProxy (serverType, ChannelServices.CrossContextUrl, null);
                        return (MarshalByRefObject) proxy.GetTransparentProxy();
+#endif
                }
 
-               public virtual RealProxy CreateProxy (ObjRef objref, Type serverType, object serverObject, Context serverContext)
+               public virtual RealProxy CreateProxy (ObjRef objRef, Type serverType, object serverObject, Context serverContext)
                {
-                       return RemotingServices.GetRealProxy (RemotingServices.GetProxyForRemoteObject (objref, serverType));
+                       return RemotingServices.GetRealProxy (RemotingServices.GetProxyForRemoteObject (objRef, serverType));
                }
 
+               [ComVisible (true)]
                public void GetPropertiesForNewContext (IConstructionCallMessage msg)
                {
                        // Nothing to add
                }
 
+               [ComVisible (true)]
                public bool IsContextOK (Context ctx, IConstructionCallMessage msg)
                {
                        return true;