File: AspNetWebSocketContext.cs

package info (click to toggle)
mono 6.8.0.105%2Bdfsg-3.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,284,512 kB
  • sloc: cs: 11,172,132; xml: 2,850,069; ansic: 671,653; cpp: 122,091; perl: 59,366; javascript: 30,841; asm: 22,168; makefile: 20,093; sh: 15,020; python: 4,827; pascal: 925; sql: 859; sed: 16; php: 1
file content (209 lines) | stat: -rw-r--r-- 7,278 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
//------------------------------------------------------------------------------
// <copyright file="AspNetWebSocketContext.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace System.Web.WebSockets {
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using System.Diagnostics.CodeAnalysis;
    using System.Net;
    using System.Net.WebSockets;
    using System.Security.Principal;
    using System.Web.Caching;
    using System.Web.Profile;

    // Mockable context object that's similar to HttpContextBase, but for WebSocket requests

    public abstract class AspNetWebSocketContext : WebSocketContext {

        //Maps to HttpRequest.AnonymousID
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID", Justification = @"Inline with HttpRequest")]
        public virtual string AnonymousID {
            get { throw new NotImplementedException(); }
        }

        // Maps to HttpContext.Application
        public virtual HttpApplicationStateBase Application {
            get { throw new NotImplementedException(); }
        }

        //Maps to HttpRequest.ApplicationPath
        public virtual string ApplicationPath {
            get { throw new NotImplementedException(); }
        }

        //Access to the ASP.NET Cache object normally available off of
        //HttpContext.Current.Cache
        public virtual Cache Cache {
            get { throw new NotImplementedException(); }
        }

        //Access to the client certificate (if any)
        public virtual HttpClientCertificate ClientCertificate {
            get { throw new NotImplementedException(); }
        }

        // returns the number of active WebSockets connections (DevDiv #200247)
        public static int ConnectionCount {
            get { return AspNetWebSocketManager.Current.ActiveSocketCount; }
        }

        public override CookieCollection CookieCollection {
            get { throw new NotImplementedException(); }
        }

        //Access to cookies using ASP.NET cookie types
        public virtual HttpCookieCollection Cookies {
            get { throw new NotImplementedException(); }
        }

        //maps to HttpRequest.FilePath
        public virtual string FilePath {
            get { throw new NotImplementedException(); }
        }

        public override NameValueCollection Headers {
            get { throw new NotImplementedException(); }
        }

        public override bool IsAuthenticated {
            get { throw new NotImplementedException(); }
        }

        //Can be used by the websocket developer to detect if the underlying
        //TCP/IP connection is still alive.
        public virtual bool IsClientConnected {
            get { throw new NotImplementedException(); }
        }

        //maps to HttpContext.IsDebuggingEnabled
        public virtual bool IsDebuggingEnabled {
            get { throw new NotImplementedException(); }
        }

        public override bool IsLocal {
            get { throw new NotImplementedException(); }
        }

        public override bool IsSecureConnection {
            get { throw new NotImplementedException(); }
        }

        // maps to HttpContext.Items
        public virtual IDictionary Items {
            get { throw new NotImplementedException(); }
        }

        //Access to the underlying IIS security token for the current request.
        [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Logon", Justification = @"Inline with HttpRequest.LogonUserIdentity")]
        public virtual WindowsIdentity LogonUserIdentity {
            get { throw new NotImplementedException(); }
        }

        public override string Origin
        {
            get { throw new NotImplementedException(); }
        }

        //Maps to HttpRequest.Path
        public virtual string Path {
            get { throw new NotImplementedException(); }
        }

        //Maps to HttpRequest.PathInfo
        public virtual string PathInfo {
            get { throw new NotImplementedException(); }
        }

        //Maps to HttpContext.Profile
        public virtual ProfileBase Profile {
            get { throw new NotImplementedException(); }
        }

        //The query-string of the websocket request Url
        public virtual NameValueCollection QueryString {
            get { throw new NotImplementedException(); }
        }

        //The raw request Url exposes as a string
        [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = @"Inline with HttpRequest.RawUrl")]
        public virtual string RawUrl {
            get { throw new NotImplementedException(); }
        }

        public override Uri RequestUri {
            get { throw new NotImplementedException(); }
        }

        public override string SecWebSocketKey {
            get { throw new NotImplementedException(); }
        }

        public override IEnumerable<string> SecWebSocketProtocols {
            get { throw new NotImplementedException(); }
        }

        public override string SecWebSocketVersion {
            get { throw new NotImplementedException(); }
        }

        // Maps to HttpContext.Server
        public virtual HttpServerUtilityBase Server {
            get { throw new NotImplementedException(); }
        }

        // Maps to HttpRequest.ServerVariables
        public virtual NameValueCollection ServerVariables {
            get { throw new NotImplementedException(); }
        }

        //Maps to HttpContext.Timestamp
        public virtual DateTime Timestamp {
            get { throw new NotImplementedException(); }
        }

        // Maps to HttpRequest.Unvalidated
        public virtual UnvalidatedRequestValuesBase Unvalidated {
            get { throw new NotImplementedException(); }
        }

        //Same as HttpRequest.UrlReferrer
        public virtual Uri UrlReferrer {
            get { throw new NotImplementedException(); }
        }

        public override IPrincipal User {
            get { throw new NotImplementedException(); }
        }

        //Same as HttpRequest.UserAgent
        public virtual string UserAgent {
            get { throw new NotImplementedException(); }
        }

        //Same as HttpRequest.UserHostAddress
        public virtual string UserHostAddress {
            get { throw new NotImplementedException(); }
        }

        //Same as HttpRequest.UserHostName
        public virtual string UserHostName {
            get { throw new NotImplementedException(); }
        }

        //Same as HttpRequest.UserLanguages
        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = @"Inline with HttpRequest.UserLanguages")]
        public virtual string[] UserLanguages {
            get { throw new NotImplementedException(); }
        }

        public override WebSocket WebSocket {
            get { throw new NotImplementedException(); }
        }

    }
}