<PackageReference Include="Castle.Windsor" Version="2.5.3" />

ServiceOverride

public class ServiceOverride : Property
Represents a service override.
using System; namespace Castle.MicroKernel.Registration { public class ServiceOverride : Property { private readonly Type type; public Type Type => type; internal ServiceOverride(object key, object value) : base(key, value) { } internal ServiceOverride(object key, object value, Type type) : base(key, value) { this.type = type; } public new static ServiceOverrideKey ForKey(string key) { return new ServiceOverrideKey(key); } public new static ServiceOverrideKey ForKey(Type key) { return new ServiceOverrideKey(key); } public new static ServiceOverrideKey ForKey<TKey>() { return new ServiceOverrideKey(typeof(TKey)); } } }