using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Chernobyl.Collections.Generic.Event;
namespace Chernobyl.Dependency
{
///
/// A base class for s that are used to work with
/// services.
///
public abstract class ServiceAttribute : Attribute
{
///
/// Initializes a new instance of the
/// class.
///
protected ServiceAttribute() : this(Array.Empty)
{}
///
/// Initializes a new instance of the
/// class.
///
/// The location of the service within the
/// hierarchy or an empty array if the service
/// is at the root of the hierarchy. This array
/// represents the "path" that must be taken through the hierarchy of
/// to get to the location where the service
/// specified by resides. Each
/// must implement the
/// interface. An example of what the service path might look like
/// (using '/' as separators):
/// /IEventCollection{Object}/IGraphicsServices/ITextureServices
/// In this example, the service represented by
/// is located in the ITextureServices. That
/// is located within IGraphicsServices which
/// is located at the root .
protected ServiceAttribute(params Type[] location)
{
Location = location;
}
///
/// Performs the intended goal of this
/// with relation to the attributed code element
/// () and the
/// () that is processing that code element.
///
/// The instance that
/// allows access to the other services and provides adding or removing
/// of specific services.
/// The instance that contained a code element that
/// was attributed with a derived instance.
/// The code element that was attributed
/// with a derived instance.
public abstract void Resolve(IEventCollection