Table of Contents

Class ResourceContentManager

Namespace
Microsoft.Xna.Framework.Content
Assembly
MonoGame.Framework.dll

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 IServiceProvider

The service provider the ResourceContentManager should use to locate services.

resource ResourceManager

The 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 string

The name of the asset being read.

Returns

Stream

Exceptions

ContentLoadException

Error loading assetName. The resource was not a binary resource, or the resource was not found.