RemotingProxy.cs 749 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // System.Runtime.Remoting.Proxies.RemotingProxy.cs
  3. //
  4. // Authors:
  5. // Dietmar Maurer ([email protected])
  6. // Lluis Sanchez Gual ([email protected])
  7. //
  8. // (C) 2001 Ximian, Inc. http://www.ximian.com
  9. //
  10. using System;
  11. using System.Runtime.Remoting.Messaging;
  12. using System.Runtime.Remoting.Channels;
  13. using System.Runtime.CompilerServices;
  14. namespace System.Runtime.Remoting.Proxies
  15. {
  16. public class RemotingProxy : RealProxy
  17. {
  18. IMessageSink _sink;
  19. internal RemotingProxy (Type type, Identity identity) : base (type, identity)
  20. {
  21. _sink = identity.ClientSink;
  22. }
  23. public override IMessage Invoke (IMessage request)
  24. {
  25. ((MonoMethodMessage)request).Uri = ObjectIdentity.ObjectUri;
  26. return _sink.SyncProcessMessage (request);
  27. }
  28. }
  29. }