using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Chernobyl.Collections.Generic.Event;
namespace Chernobyl.Resources
{
///
/// A class that works with resources and provides helper methods for dealing
/// with resources.
///
public static class Resource
{
///
/// Reads a resource from a file or from some other location that uses
/// a string based resource naming convention (such as XNA), specifically,
/// it calls on the main texture processor to processor the requested
/// resource. This method will first check to see if the string passed in
/// exists somewhere in the instance. If not
/// it will assume the resource is a named resource and attempt to load
/// it that way. If a file does exist, then the file will be read in from
/// a FileStream created using and
/// .
///
/// The type of the resource being loaded.
/// For example, if you wanted to load a texture from Chernobyl.Graphics,
/// this type would be ITexture.
/// The object that holds all of the services.
/// The callback method that is to be invoked when
/// the resource is finished loading.
/// The path to the file to read the
/// ResourceType from or a name to the resource to load.
/// The options to pass to the
/// main ResourceType IResourceProcessor. You don't have to pass anything
/// for this parameter unless an IResourceProcessor requires an option
/// to be set.
public static void From(IEventCollection