ResourceProvider class
Abstract class for looking up a resource by id.
Constructors
Resource |
Initialize an instance of |
Properties
changed | Event which is fired if any resource managed by the resource provider detects changes to the underlining resource. |
id | Gets the ID for this resource provider. |
resource |
Gets the resource explorer. |
Methods
get |
Gets resource by id. |
get |
Enumerate resources. |
refresh() | Refresh any cached resources. |
Constructor Details
ResourceProvider(ResourceExplorer)
Initialize an instance of ResourceProvider
class.
new ResourceProvider(resourceExplorer: ResourceExplorer)
Parameters
- resourceExplorer
- ResourceExplorer
Resource explorer.
Property Details
changed
Event which is fired if any resource managed by the resource provider detects changes to the underlining resource.
any changed
Property Value
any
id
Gets the ID for this resource provider.
string id
Property Value
string
The ID for this resource provider.
resourceExplorer
Gets the resource explorer.
ResourceExplorer resourceExplorer
Property Value
The resource explorer.
Method Details
getResource(string)
Gets resource by id.
function getResource(id: string): Resource
Parameters
- id
-
string
Resource id.
Returns
getResources(string)
Enumerate resources.
function getResources(extension: string): Resource[]
Parameters
- extension
-
string
Extension filter.
Returns
Resource[]
refresh()
Refresh any cached resources.
function refresh()