WebRequest.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. //
  2. // System.Net.WebRequest
  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 WebRequest : MarshalByRefObject, ISerializable
  14. {
  15. // Constructors
  16. protected WebRequest () {}
  17. protected WebRequest (SerializationInfo serializationInfo, StreamingContext streamingContext)
  18. {
  19. throw new NotSupportedException ();
  20. }
  21. // Properties
  22. public virtual string ConnectionGroupName {
  23. get { throw new NotSupportedException (); }
  24. set { throw new NotSupportedException (); }
  25. }
  26. public virtual long ContentLength {
  27. get { throw new NotSupportedException (); }
  28. set { throw new NotSupportedException (); }
  29. }
  30. public virtual string ContentType {
  31. get { throw new NotSupportedException (); }
  32. set { throw new NotSupportedException (); }
  33. }
  34. public virtual ICredentials Credentials {
  35. get { throw new NotSupportedException (); }
  36. set { throw new NotSupportedException (); }
  37. }
  38. public virtual WebHeaderCollection Headers {
  39. get { throw new NotSupportedException (); }
  40. set { throw new NotSupportedException (); }
  41. }
  42. public virtual string Method {
  43. get { throw new NotSupportedException (); }
  44. set { throw new NotSupportedException (); }
  45. }
  46. public virtual bool PreAuthenticate {
  47. get { throw new NotSupportedException (); }
  48. set { throw new NotSupportedException (); }
  49. }
  50. public virtual IWebProxy Proxy {
  51. get { throw new NotSupportedException (); }
  52. set { throw new NotSupportedException (); }
  53. }
  54. public virtual Uri RequestUri {
  55. get { throw new NotSupportedException (); }
  56. set { throw new NotSupportedException (); }
  57. }
  58. public virtual int Timeout {
  59. get { throw new NotSupportedException (); }
  60. set { throw new NotSupportedException (); }
  61. }
  62. // Methods
  63. public virtual void Abort()
  64. {
  65. throw new NotSupportedException ();
  66. }
  67. public virtual IAsyncResult BeginGetRequestStream (AsyncCallback callback, object state)
  68. {
  69. throw new NotSupportedException ();
  70. }
  71. public virtual IAsyncResult BeginGetResponse (AsyncCallback callback, object state)
  72. {
  73. throw new NotSupportedException ();
  74. }
  75. public static WebRequest Create (string requestUriString)
  76. {
  77. if (requestUriString == null)
  78. throw new ArgumentNullException ("requestUriString");
  79. return Create (new Uri (requestUriString));
  80. }
  81. [MonoTODO]
  82. public static WebRequest Create (Uri requestUri)
  83. {
  84. if (requestUri == null)
  85. throw new ArgumentNullException ("requestUri");
  86. throw new NotImplementedException ();
  87. }
  88. [MonoTODO]
  89. public static WebRequest CreateDefault (Uri requestUri)
  90. {
  91. if (requestUri == null)
  92. throw new ArgumentNullException ("requestUri");
  93. throw new NotImplementedException ();
  94. }
  95. public virtual Stream EndGetRequestStream (IAsyncResult asyncResult)
  96. {
  97. throw new NotSupportedException ();
  98. }
  99. public virtual WebResponse EndGetResponse (IAsyncResult asyncResult)
  100. {
  101. throw new NotSupportedException ();
  102. }
  103. public virtual Stream GetRequestStream()
  104. {
  105. throw new NotSupportedException ();
  106. }
  107. public virtual WebResponse GetResponse()
  108. {
  109. throw new NotSupportedException ();
  110. }
  111. void ISerializable.GetObjectData (SerializationInfo serializationInfo,
  112. StreamingContext streamingContext)
  113. {
  114. throw new NotSupportedException ();
  115. }
  116. [MonoTODO]
  117. public static bool RegisterPrefix (string prefix, IWebRequestCreate creator)
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. }
  122. }