WebResponse.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // System.Net.WebResponse
  3. //
  4. // Author:
  5. // Lawrence Pit ([email protected])
  6. //
  7. using System;
  8. using System.IO;
  9. using System.Runtime.Serialization;
  10. namespace System.Net
  11. {
  12. [Serializable]
  13. public abstract class WebResponse : MarshalByRefObject, ISerializable, IDisposable
  14. {
  15. // Constructors
  16. protected WebResponse ()
  17. {
  18. throw new NotSupportedException ();
  19. }
  20. protected WebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext)
  21. {
  22. throw new NotSupportedException ();
  23. }
  24. // Properties
  25. public virtual long ContentLength {
  26. get { throw new NotSupportedException (); }
  27. set { throw new NotSupportedException (); }
  28. }
  29. public virtual string ContentType {
  30. get { throw new NotSupportedException (); }
  31. set { throw new NotSupportedException (); }
  32. }
  33. public virtual WebHeaderCollection Headers {
  34. get { throw new NotSupportedException (); }
  35. }
  36. public virtual Uri ResponseUri {
  37. get { throw new NotSupportedException (); }
  38. }
  39. // Methods
  40. public virtual void Close()
  41. {
  42. throw new NotSupportedException ();
  43. }
  44. public virtual Stream GetResponseStream()
  45. {
  46. throw new NotSupportedException ();
  47. }
  48. void IDisposable.Dispose()
  49. {
  50. Close ();
  51. }
  52. void ISerializable.GetObjectData (SerializationInfo serializationInfo,
  53. StreamingContext streamingContext)
  54. {
  55. throw new NotSupportedException ();
  56. }
  57. }
  58. }