Class ContentManager
public class ContentManager : IDisposable
- Inheritance
-
ContentManager
- Implements
- Derived
- Inherited Members
Constructors
ContentManager(IServiceProvider)
public ContentManager(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProvider
ContentManager(IServiceProvider, string)
public ContentManager(IServiceProvider serviceProvider, string rootDirectory)
Parameters
serviceProvider
IServiceProviderrootDirectory
string
Properties
LoadedAssets
Virtual property to allow a derived ContentManager to have it's assets reloaded
protected virtual Dictionary<string, object> LoadedAssets { get; }
Property Value
RootDirectory
public string RootDirectory { get; set; }
Property Value
ServiceProvider
public IServiceProvider ServiceProvider { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
~ContentManager()
protected ~ContentManager()
LoadLocalized<T>(string)
public virtual T LoadLocalized<T>(string assetName)
Parameters
assetName
string
Returns
- T
Type Parameters
T
Load<T>(string)
public virtual T Load<T>(string assetName)
Parameters
assetName
string
Returns
- T
Type Parameters
T
OpenStream(string)
protected virtual Stream OpenStream(string assetName)
Parameters
assetName
string
Returns
ReadAsset<T>(string, Action<IDisposable>)
protected T ReadAsset<T>(string assetName, Action<IDisposable> recordDisposableObject)
Parameters
assetName
stringrecordDisposableObject
Action<IDisposable>
Returns
- T
Type Parameters
T
ReloadAsset<T>(string, T)
protected virtual void ReloadAsset<T>(string originalAssetName, T currentAsset)
Parameters
originalAssetName
stringcurrentAsset
T
Type Parameters
T
ReloadGraphicsAssets()
protected virtual void ReloadGraphicsAssets()
Unload()
public virtual void Unload()
UnloadAsset(string)
Unloads a single asset.
public virtual void UnloadAsset(string assetName)
Parameters
assetName
stringThe name of the asset to unload. This cannot be null.
UnloadAssets(IList<string>)
Unloads a set of assets.
public virtual void UnloadAssets(IList<string> assetNames)