WebResponse.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. protected WebResponse (SerializationInfo serializationInfo, StreamingContext streamingContext)
  18. {
  19. throw new NotSupportedException ();
  20. }
  21. // Properties
  22. public virtual long ContentLength {
  23. get { throw new NotSupportedException (); }
  24. set { throw new NotSupportedException (); }
  25. }
  26. public virtual string ContentType {
  27. get { throw new NotSupportedException (); }
  28. set { throw new NotSupportedException (); }
  29. }
  30. public virtual WebHeaderCollection Headers {
  31. get { throw new NotSupportedException (); }
  32. }
  33. public virtual Uri ResponseUri {
  34. get { throw new NotSupportedException (); }
  35. }
  36. // Methods
  37. public virtual void Close()
  38. {
  39. throw new NotSupportedException ();
  40. }
  41. public virtual Stream GetResponseStream()
  42. {
  43. throw new NotSupportedException ();
  44. }
  45. void IDisposable.Dispose()
  46. {
  47. Close ();
  48. }
  49. void ISerializable.GetObjectData (SerializationInfo serializationInfo,
  50. StreamingContext streamingContext)
  51. {
  52. throw new NotSupportedException ();
  53. }
  54. }
  55. }