[System] Add stub for System.Net.WebSockets
[mono.git] / mcs / class / System / System.Net.WebSockets / WebSocketException.cs
1 //
2 // WebSocketException.cs
3 //
4 // Authors:
5 //    Jérémie Laval <jeremie dot laval at xamarin dot com>
6 //
7 // Copyright 2013 Xamarin Inc (http://www.xamarin.com).
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
15 //
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
18 //
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 // THE SOFTWARE.
26 //
27 //
28
29 #if NET_4_5
30
31 using System;
32 using System.Security.Principal;
33 using System.Runtime.CompilerServices;
34
35 namespace System.Net.WebSockets
36 {
37         public sealed class WebSocketException : Win32Exception
38         {
39                 public WebSocketException ()
40                 {
41                         
42                 }
43
44                 public WebSocketException (int nativeError) : base (nativeError)
45                 {
46                         
47                 }
48
49                 public WebSocketException (string message) : base (message)
50                 {
51                         
52                 }
53
54                 public WebSocketException (WebSocketError error)
55                 {
56                         WebSocketErrorCode = error;
57                 }
58
59                 public WebSocketException (int nativeError, Exception innerException)
60                 {
61                         
62                 }
63
64                 public WebSocketException (int nativeError, string message) : base (nativeError, message)
65                 {
66                         
67                 }
68
69                 public WebSocketException (string message, Exception innerException) : base (message, innerException)
70                 {
71                         
72                 }
73
74                 public WebSocketException (WebSocketError error, Exception innerException) : base (innerException)
75                 {
76                         WebSocketErrorCode = error;
77                 }
78
79                 public WebSocketException (WebSocketError error, int nativeError) : base (nativeError)
80                 {
81                         WebSocketErrorCode = error;
82                 }
83
84                 public WebSocketException (WebSocketError error, string message) : base (message)
85                 {
86                         WebSocketErrorCode = error;
87                 }
88
89                 public WebSocketException (WebSocketError error, int nativeError, Exception innerException) : base (nativeError)
90                 {
91                         WebSocketErrorCode = error;
92                 }
93
94                 public WebSocketException (WebSocketError error, int nativeError, string message) : base (nativeError, message)
95                 {
96                         WebSocketErrorCode = error;
97                 }
98
99                 public WebSocketException (WebSocketError error, string message, Exception innerException)
100                 {
101                         WebSocketErrorCode = error;
102                 }
103
104                 public WebSocketException (WebSocketError error, int nativeError, string message, Exception innerException) : base (nativeError, message)
105                 {
106                         WebSocketErrorCode = error;
107                 }
108
109                 public WebSocketError WebSocketErrorCode {
110                         get;
111                         private set;
112                 }
113         }
114 }
115
116 #endif