3using System.Threading.Tasks;
14 private readonly
string fileName;
15 private readonly
string contentType;
16 private readonly
bool isText;
49 this.fileName = Path.GetFullPath(FileName);
50 this.contentType = ContentType;
79 Response.ContentType = this.contentType;
85 await Response.
Write(Content);
91 Response.ContentLength = Content.Length;
93 await Response.
Write(Content);
Plain text encoder/decoder.
static Task< string > GetTextFileSettingAsync(IHostReference HostRef, string FileName)
Gets the contents of a configurable domain-sensitive text file.
static Task< byte[]> GetBinaryFileSettingAsync(IHostReference HostRef, string FileName)
Gets the contents of a configurable domain-sensitive binary file.
static Task< DateTime > GetFileSettingTimestampAsync(IHostReference HostRef, string FileName)
Gets the timestamp of contents of a configurable domain-sensitive file.
Represents a file-based resource that can have custom values depending on what domain the resource is...
HttpConfigurableFileResource(string ResourceName, string FileName)
Represents a file-based resource that can have custom values depending on what domain the resource is...
HttpConfigurableFileResource(string ResourceName, string FileName, string ContentType)
Represents a file-based resource that can have custom values depending on what domain the resource is...
override bool HandlesSubPaths
If the resource handles sub-paths.
async Task GET(HttpRequest Request, HttpResponse Response)
Executes the GET method on the resource.
bool AllowsGET
If the GET method is allowed.
HttpConfigurableFileResource(string ResourceName, string FileName, string ContentType, bool IsText)
Represents a file-based resource that can have custom values depending on what domain the resource is...
override bool UserSessions
If the resource uses user sessions.
Represents an HTTP request.
string ResourceName
Name of resource.
Represets a response of an HTTP client request.
async Task Write(byte[] Data)
Returns binary data in the response.
Base class for all synchronous HTTP resources. A synchronous resource responds within the method hand...
GET Interface for HTTP resources.