ResourceProvider class

Abstract class for looking up a resource by id.

Constructors

ResourceProvider(ResourceExplorer)

Initialize an instance of ResourceProvider class.

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.

resourceExplorer

Gets the resource explorer.

Methods

getResource(string)

Gets resource by id.

getResources(string)

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

refresh()

Refresh any cached resources.

function refresh()