Class ResourceConfiguration<TResource>
Provides the abstract base class for configuring and loading specific resources.
public abstract class ResourceConfiguration<TResource> : IResourceConfiguration where TResource : IDisposable
Type Parameters
TResourceThe type of the resource.
- Inheritance
-
ResourceConfiguration<TResource>
- Implements
- Derived
- Inherited Members
Properties
Name
Gets or sets the name of the resource.
public string Name { get; set; }
Property Value
Methods
CreateResource(ResourceManager)
When overridden in a derived class, creates a new resource of type
TResource.
public abstract TResource CreateResource(ResourceManager resourceManager)
Parameters
resourceManagerResourceManagerThe ResourceManager object onto which this resource will be loaded. The resource manager can be accessed to load additional resource dependencies which may be required to create the new resource.
Returns
- TResource
A new instance of type
TResource.
OpenResource(string)
Opens a stream for reading the specified resource.
protected Stream OpenResource(string path)
Parameters
pathstringThe name of the resource to be opened for reading.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.