using System;
namespace Abp.Dependency
{
///
/// Define interface for classes those are used to resolve dependencies.
///
public interface IIocResolver
{
///
/// Gets an object from IOC container.
/// Returning object must be Released (see ) after usage.
///
/// Type of the object to get
/// The object instance
T Resolve();
///
/// Gets an object from IOC container.
/// Returning object must be Released (see ) after usage.
///
/// Type of the object to cast
/// Type of the object to resolve
/// The object instance
T Resolve(Type type);
///
/// Gets an object from IOC container.
/// Returning object must be Released (see ) after usage.
///
/// Type of the object to get
/// Constructor arguments
/// The object instance
T Resolve(object argumentsAsAnonymousType);
///
/// Gets an object from IOC container.
/// Returning object must be Released (see ) after usage.
///
/// Type of the object to get
/// The object instance
object Resolve(Type type);
///
/// Gets an object from IOC container.
/// Returning object must be Released (see ) after usage.
///
/// Type of the object to get
/// Constructor arguments
/// The object instance
object Resolve(Type type, object argumentsAsAnonymousType);
///
/// Gets all implementations for given type.
/// Returning objects must be Released (see ) after usage.
///
/// Type of the objects to resolve
/// Object instances
T[] ResolveAll();
///
/// Gets all implementations for given type.
/// Returning objects must be Released (see ) after usage.
///
/// Type of the objects to resolve
/// Constructor arguments
/// Object instances
T[] ResolveAll(object argumentsAsAnonymousType);
///
/// Gets all implementations for given type.
/// Returning objects must be Released (see ) after usage.
///
/// Type of the objects to resolve
/// Object instances
object[] ResolveAll(Type type);
///
/// Gets all implementations for given type.
/// Returning objects must be Released (see ) after usage.
///
/// Type of the objects to resolve
/// Constructor arguments
/// Object instances
object[] ResolveAll(Type type, object argumentsAsAnonymousType);
///
/// Releases a pre-resolved object. See Resolve methods.
///
/// Object to be released
void Release(object obj);
///
/// Checks whether given type is registered before.
///
/// Type to check
bool IsRegistered(Type type);
///
/// Checks whether given type is registered before.
///
/// Type to check
bool IsRegistered();
}
}