BinaryClientFormatterSink.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. //
  2. // System.Runtime.Remoting.Channels.BinaryClientFormatterSink.cs
  3. //
  4. // Author: Rodrigo Moya ([email protected])
  5. // Dietmar Maurer ([email protected])
  6. //
  7. // 2002 (C) Copyright, Ximian, Inc.
  8. //
  9. using System.Collections;
  10. using System.IO;
  11. using System.Runtime.Remoting.Messaging;
  12. namespace System.Runtime.Remoting.Channels
  13. {
  14. public class BinaryClientFormatterSink : IClientFormatterSink,
  15. IMessageSink, IClientChannelSink, IChannelSinkBase
  16. {
  17. private IClientChannelSink nextInChain;
  18. public BinaryClientFormatterSink (IClientChannelSink nextSink)
  19. {
  20. nextInChain = nextSink;
  21. }
  22. public IClientChannelSink NextChannelSink
  23. {
  24. get {
  25. return nextInChain;
  26. }
  27. }
  28. public IMessageSink NextSink
  29. {
  30. get {
  31. return (IMessageSink) nextInChain;
  32. }
  33. }
  34. public IDictionary Properties
  35. {
  36. get {
  37. return null;
  38. }
  39. }
  40. [MonoTODO]
  41. public IMessageCtrl AsyncProcessMessage (IMessage msg,
  42. IMessageSink replySink)
  43. {
  44. throw new NotImplementedException ();
  45. }
  46. [MonoTODO]
  47. public void AsyncProcessRequest (IClientChannelSinkStack sinkStack,
  48. IMessage msg,
  49. ITransportHeaders headers,
  50. Stream stream)
  51. {
  52. throw new NotImplementedException ();
  53. }
  54. [MonoTODO]
  55. public void AsyncProcessResponse (IClientResponseChannelSinkStack sinkStack,
  56. object state,
  57. ITransportHeaders headers,
  58. Stream stream)
  59. {
  60. throw new NotImplementedException ();
  61. }
  62. public Stream GetRequestStream (IMessage msg,
  63. ITransportHeaders headers)
  64. {
  65. return null;
  66. }
  67. public void ProcessMessage (IMessage msg,
  68. ITransportHeaders requestHeaders,
  69. Stream requestStream,
  70. out ITransportHeaders responseHeaders,
  71. out Stream responseStream)
  72. {
  73. nextInChain.ProcessMessage (msg, requestHeaders, requestStream,
  74. out responseHeaders, out responseStream);
  75. }
  76. [MonoTODO]
  77. public IMessage SyncProcessMessage (IMessage msg)
  78. {
  79. ITransportHeaders response_headers;
  80. Stream response_stream;
  81. // fixme: use nextInChain.GetRequestStream() ??
  82. Stream out_stream = new MemoryStream ();
  83. // fixme: serialize msg to the stream
  84. ProcessMessage (msg, null, out_stream, out response_headers, out response_stream);
  85. // fixme: deserialize response_stream
  86. IMessage result = null;
  87. return null;
  88. }
  89. }
  90. }