BadScript 2
Loading...
Searching...
No Matches
BadHttpContext.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Net;
3
7
12
17{
21 private static readonly BadClassPrototype s_Prototype = new BadNativeClassPrototype<BadHttpContext>("HttpContext",
22 (_, _) => throw new BadRuntimeException("Cannot create new Http Contexts")
23 );
24
29 public BadHttpContext(HttpListenerContext context)
30 {
31 Context = context;
32 }
33
37 public HttpListenerContext Context { get; }
38
41 {
42 return s_Prototype;
43 }
44
46 public override string ToSafeString(List<BadObject> done)
47 {
48 return Context.ToString();
49 }
50}
Wrapper for the HttpListenerContext.
static readonly BadClassPrototype s_Prototype
Class Prototype Instance.
HttpListenerContext Context
The underlying HttpListenerContext.
BadHttpContext(HttpListenerContext context)
Constructs a new BadHttpContext.
override string ToSafeString(List< BadObject > done)
override BadClassPrototype GetPrototype()
The Base Class for all BadScript Objects.
Definition BadObject.cs:14
Implements a Class Prototype for the BadScript Language.
Contains Network Hosting Extensions and APIs for the BadScript2 Runtime.
Contains the Error Objects for the BadScript2 Language.
Contains the Runtime Objects.
Definition BadArray.cs:10