C# Class Indiefreaks.Xna.Core.ContentCatalogue

The ContentCatalogue class encapsulates the Xna ContentManager class to Load content as WeakReferences avoiding therefore to manage Content memory.
Inheritance: IContentCatalogue
显示文件 Open project: Indiefreaks/igf Class Usage Examples

Public Methods

Method Description
Add ( IContentHost host ) : void

Register an IContentHost instance with this content manager

ContentCatalogue ( Application application ) : System

Construct a object content manager, creating an XNA content manager

ContentCatalogue ( Application application, Microsoft.Xna.Framework.Content.ContentManager manager ) : System

Construct a object content manager

ContentCatalogue ( Application application, string rootDirectory ) : System

Construct a object content manager, creating an XNA content manager

Dispose ( ) : void

Dispose the Content manager and unload all instances

Remove ( IContentHost host ) : void

Unregister an IContentHost instance with this content manager. NOTE: Instances are stored by weak reference and do not need to be manually removed (see remarks)

Instances are stored by weak reference, so this method should only be called when removing the object early is desired.

Instances will not be kept alive when added, and do not need to be removed to make sure they are garbage collected

Private Methods

Method Description
AddHighPriority ( IContentHost host ) : void
CallLoad ( ) : void
CallUnload ( ) : void
DeviceCreated ( object sender, EventArgs e ) : void
DeviceReset ( object sender, EventArgs e ) : void
DeviceResetting ( object sender, EventArgs e ) : void
ProcessDelayed ( ) : void

Method Details

Add() public method

Register an IContentHost instance with this content manager
public Add ( IContentHost host ) : void
host IContentHost
return void

ContentCatalogue() public method

Construct a object content manager, creating an XNA content manager
public ContentCatalogue ( Application application ) : System
application Application Application instance
return System

ContentCatalogue() public method

Construct a object content manager
public ContentCatalogue ( Application application, Microsoft.Xna.Framework.Content.ContentManager manager ) : System
application Application Application instance
manager Microsoft.Xna.Framework.Content.ContentManager XNA ContentManager instatnce
return System

ContentCatalogue() public method

Construct a object content manager, creating an XNA content manager
public ContentCatalogue ( Application application, string rootDirectory ) : System
application Application Application instance
rootDirectory string Root content directory
return System

Dispose() public method

Dispose the Content manager and unload all instances
public Dispose ( ) : void
return void

Remove() public method

Unregister an IContentHost instance with this content manager. NOTE: Instances are stored by weak reference and do not need to be manually removed (see remarks)

Instances are stored by weak reference, so this method should only be called when removing the object early is desired.

Instances will not be kept alive when added, and do not need to be removed to make sure they are garbage collected

public Remove ( IContentHost host ) : void
host IContentHost
return void