diff options
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System/System.Net/WebRequest.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs index 59e4122eac7..53a398fd62b 100644 --- a/mcs/class/System/System.Net/WebRequest.cs +++ b/mcs/class/System/System.Net/WebRequest.cs @@ -80,11 +80,12 @@ namespace System.Net } #if NET_2_1 - AddPrefix ("http", typeof (HttpRequestCreator)); - AddPrefix ("https", typeof (HttpRequestCreator)); + IWebRequestCreate http = new HttpRequestCreator (); + RegisterPrefix ("http", http); + RegisterPrefix ("https", http); #if MOBILE - AddPrefix ("file", typeof (FileWebRequestCreator)); - AddPrefix ("ftp", typeof (FtpRequestCreator)); + RegisterPrefix ("file", new FileWebRequestCreator ()); + RegisterPrefix ("ftp", new FtpRequestCreator ()); #endif #else #if NET_2_0 |