using System;
using System.IO;
using System.Linq;
using Chernobyl.Collections.Generic.Event;
using Chernobyl.Dependency;
using Chernobyl.Resources;
using Microsoft.Xna.Framework.Content;
namespace Chernobyl.Graphics.Xna.Resources
{
///
/// A IResourceProcessor that uses XNA ContentManager to load resources
/// (using ). The
/// resources loaded by this processor must be added to the Visual Studio
/// project that you used to compile your application. Note that, this
/// processor does not load from the Stream passed into the From method. For
/// this reason, you can pass in null for the Stream parameter on the From
/// method. In order to load a resource with this processor, you will need to
/// pass in a ResourceName option into the options parameter where the
/// ResourceName.Name property is set to the name of the resource you want
/// to load.
///
/// The Chernobyl resource that is being
/// loaded. For example, if textures were being loaded with this processor
/// then this type would be set to 'ITexture'.
/// The XNA resource that is loaded from
/// . For example,
/// if a font was being loaded then this type would be set to 'SpriteFont'.
public class XnaResourceProcessor : ResourceProcessor
{
///
/// Constructor.
///
/// The services instance to grab services from
/// and give services to.
/// A method that can take an XNA resource
/// (XnaResourceType) and turn it into the resource type you want to
/// load (ResourceType).
public XnaResourceProcessor(IEventCollection