C# Класс Indiefreaks.Xna.Core.ContentCatalogue

The ContentCatalogue class encapsulates the Xna ContentManager class to Load content as WeakReferences avoiding therefore to manage Content memory.
Наследование: IContentCatalogue
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Add() публичный Метод

Register an IContentHost instance with this content manager
public Add ( IContentHost host ) : void
host IContentHost
Результат void

ContentCatalogue() публичный Метод

Construct a object content manager, creating an XNA content manager
public ContentCatalogue ( Application application ) : System
application Application Application instance
Результат System

ContentCatalogue() публичный Метод

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
Результат System

ContentCatalogue() публичный Метод

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
Результат System

Dispose() публичный Метод

Dispose the Content manager and unload all instances
public Dispose ( ) : void
Результат void

Remove() публичный Метод

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
Результат void