Class ResourceContentManager
Subclass of ContentManager, which is specialized to read from .resx resource files rather than directly from individual files on disk.
public class ResourceContentManager : ContentManager, IDisposable
- Inheritance
-
ResourceContentManager
- Implements
- Inherited Members
Constructors
ResourceContentManager(IServiceProvider, ResourceManager)
Creates a new instance of ResourceContentManager.
public ResourceContentManager(IServiceProvider servicesProvider, ResourceManager resource)
Parameters
servicesProvider
IServiceProviderThe service provider the ResourceContentManager should use to locate services.
resource
ResourceManagerThe resource manager for the ResourceContentManager to read from.
Exceptions
- ArgumentNullException
resource
is null.
Methods
OpenStream(string)
Opens a stream for reading the specified resource. Derived classes can replace this to implement pack files or asset compression.
protected override Stream OpenStream(string assetName)
Parameters
assetName
stringThe name of the asset being read.
Returns
Exceptions
- ContentLoadException
Error loading
assetName
. The resource was not a binary resource, or the resource was not found.