cohtml.DefaultResourceHandler
A default implementation of the cohtml.Net.IResourceHandler interface. Responsible for handling resource loading requests.
Inherits from cohtml.Net.ResourceHandler, cohtml.ISystemStorable, cohtml.ILocationsSearchable, SystemIDisposable
Public Functions
Name | |
---|---|
DefaultResourceHandler() Initializes a default host location path and adds it to a host location collection the user can access from this resource handler object. | |
override void | OnResourceRequest(IResourceRequest request, IResourceResponse response) Invoked when Cohtml makes a resource request. |
override void | OnResourceStreamRequest(IResourceRequest request, IResourceStreamResponse response) Invoked when Cohtml makes a resource stream request. |
virtual override void | OnAbortResourceRequest(uint id) Invoked when Cohtml aborts a resource request. |
virtual override void | Dispose() Stops all resource loading coroutines and aborts all pending requests. |
Public Properties
Name | |
---|---|
KeyValuePair< string, List< string > > | DefaultHostLocations Returns the default host locations for this resource handler. |
IDictionary< string, List< string > > | HostLocationsMap |
Public Attributes
Name | |
---|---|
const string | Coui |
const string | CouiProtocol |
const string | UIResourcesPath |
const string | PreloadedHost |
const string | Cohtml |
const string | SharedImagesPath |
int | PendingRequestsCount Returns the number of pending requests. |
Additional inherited members
Public Functions inherited from cohtml.Net.ResourceHandler
Name | |
---|---|
delegate void | SwigDelegateResourceHandler_0(global.System.IntPtr request, global.System.IntPtr response, global.System.IntPtr swigId) |
delegate void | SwigDelegateResourceHandler_1(global.System.IntPtr request, global.System.IntPtr response, global.System.IntPtr swigId) |
delegate void | SwigDelegateResourceHandler_2(uint id, global.System.IntPtr swigId) |
Protected Functions inherited from cohtml.Net.ResourceHandler
Name | |
---|---|
ResourceHandler() |
Protected Attributes inherited from cohtml.Net.ResourceHandler
Name | |
---|---|
bool | swigCMemOwn |
Public Functions Documentation
function DefaultResourceHandler
DefaultResourceHandler()
Initializes a default host location path and adds it to a host location collection the user can access from this resource handler object.
function OnResourceRequest
override void OnResourceRequest(
IResourceRequest request,
IResourceResponse response
)
Invoked when Cohtml makes a resource request.
function OnResourceStreamRequest
override void OnResourceStreamRequest(
IResourceRequest request,
IResourceStreamResponse response
)
Invoked when Cohtml makes a resource stream request.
function OnAbortResourceRequest
virtual override void OnAbortResourceRequest(
uint id
)
Invoked when Cohtml aborts a resource request.
Reimplements: cohtml.Net.ResourceHandler.OnAbortResourceRequest
function Dispose
virtual override void Dispose()
Stops all resource loading coroutines and aborts all pending requests.
Reimplements: cohtml.Net.ResourceHandler.Dispose
Public Property Documentation
property DefaultHostLocations
static KeyValuePair< string, List< string > > DefaultHostLocations;
Returns the default host locations for this resource handler.
property HostLocationsMap
IDictionary< string, List< string > > HostLocationsMap;
Public Attributes Documentation
variable Coui
const string Coui = "coui";
variable CouiProtocol
const string CouiProtocol = Coui + "://";
variable UIResourcesPath
const string UIResourcesPath = Cohtml + "UIResources";
variable PreloadedHost
const string PreloadedHost = "preloaded";
variable Cohtml
const string Cohtml = "Cohtml/";
variable SharedImagesPath
const string SharedImagesPath = Cohtml + "SharedImages";
variable PendingRequestsCount
int PendingRequestsCount => m_PendingRequests.Count;
Returns the number of pending requests.