using System;
using System.Collections.Generic;
using System.Text;
namespace Nuclex.Support.Services {
#if false
partial class ServiceManager {
#region class ForContext
// TODO: Rename to "On" to avoid confusion with concept of for loop?
/// Manages the context of the "For" modifier
public class ForContext {
/// Initializes a new "For" context of the service manager
/// Service manager the context operates on
/// Contract that is being modified
internal ForContext(ServiceManager serviceManager, Type contractType) {
this.serviceManager = serviceManager;
this.contractType = contractType;
}
/// Uses the specified implementation for the contract
///
/// Implementation that will be used for the contract
///
public void Use(object contractImplementation) { }
///
/// Uses the provided object as a prototype for the contract implementation
///
///
/// Contract implementation that will be used as a prototype
///
public void UsePrototype(object contractImplementationPrototype) { }
/// Selects the default implementation to use for the contract
///
/// Implementation that will be used as the default for the contract
///
public void UseDefault(Type implementationType) { }
/// Service manager the "For" context operates on
protected ServiceManager serviceManager;
/// Contract that is being modified
protected Type contractType;
}
#endregion // class ForContext
#region class ForContext<>
// TODO: Rename to "On" to avoid confusion with concept of for loop?
/// Manages the context of the "For" modifier
public class ForContext : ForContext {
/// Initializes a new "For" context of the service manager
/// Service manager the context operates on
internal ForContext(ServiceManager serviceManager) :
base(serviceManager, typeof(ContractType)) { }
/// Uses the specified implementation for the contract
///
/// Implementation that will be used for the contract
///
public void Use(ContractType implementation) { }
///
/// Uses the provided object as a prototype for the contract implementation
///
///
/// Type of the implementation that will be used as a prototype
///
///
/// Contract implementation that will be used as a prototype
///
public void UsePrototype(PrototypeType contractImplementationPrototype)
where PrototypeType : ContractType, ICloneable { }
/// Selects the default implementation to use for the contract
///
/// Implementation that will be used as the default for the contract
///
public void UseDefault()
where ImplementationType : ContractType { }
}
#endregion // class ForContext<>
}
#endif
} // namespace Nuclex.Support.DependencyInjection