mirror of https://github.com/AMT-Cheif/Stylet.git
Change some Bootstrapper methods to public, to avoid explicit interface implementation
This commit is contained in:
parent
743961ec68
commit
f47db1cbec
|
@ -45,7 +45,7 @@ namespace Bootstrappers
|
|||
/// </summary>
|
||||
protected virtual void ConfigureIoC(ContainerBuilder builder) { }
|
||||
|
||||
protected override object GetInstance(Type type)
|
||||
public override object GetInstance(Type type)
|
||||
{
|
||||
return this.container.Resolve(type);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace Bootstrappers
|
|||
/// </summary>
|
||||
protected virtual void ConfigureIoC(IWindsorContainer container) { }
|
||||
|
||||
protected override object GetInstance(Type type)
|
||||
public override object GetInstance(Type type)
|
||||
{
|
||||
return this.container.Resolve(type);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Bootstrappers
|
|||
/// </summary>
|
||||
protected virtual void ConfigureIoC(IKernel kernel) { }
|
||||
|
||||
protected override object GetInstance(Type type)
|
||||
public override object GetInstance(Type type)
|
||||
{
|
||||
return this.kernel.Get(type);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace Bootstrappers
|
|||
/// </summary>
|
||||
protected virtual void ConfigureIoC(ConfigurationExpression config) { }
|
||||
|
||||
protected override object GetInstance(Type type)
|
||||
public override object GetInstance(Type type)
|
||||
{
|
||||
return this.container.GetInstance(type);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Bootstrappers
|
|||
/// </summary>
|
||||
protected virtual void ConfigureIoC(IUnityContainer container) { }
|
||||
|
||||
protected override object GetInstance(Type type)
|
||||
public override object GetInstance(Type type)
|
||||
{
|
||||
return this.container.Resolve(type);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Stylet
|
|||
/// </summary>
|
||||
/// <param name="type">Type to fetch</param>
|
||||
/// <returns>Fetched instance</returns>
|
||||
protected override object GetInstance(Type type)
|
||||
public override object GetInstance(Type type)
|
||||
{
|
||||
return this.Container.Get(type);
|
||||
}
|
||||
|
|
|
@ -18,13 +18,13 @@ namespace Stylet
|
|||
/// <summary>
|
||||
/// Reference to the current application
|
||||
/// </summary>
|
||||
protected Application Application { get; private set; }
|
||||
public Application Application { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Assemblies which are used for IoC container auto-binding and searching for Views.
|
||||
/// Set this in Configure() if you want to override it
|
||||
/// </summary>
|
||||
protected List<Assembly> Assemblies { get; set; }
|
||||
public IList<Assembly> Assemblies { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Instantiate a new BootstrapperBase
|
||||
|
@ -59,7 +59,7 @@ namespace Stylet
|
|||
/// <summary>
|
||||
/// Called on Application.Startup, this does everything necessary to start the application
|
||||
/// </summary>
|
||||
protected virtual void Start()
|
||||
public virtual void Start()
|
||||
{
|
||||
// Use the current SynchronizationContext for the Execute helper
|
||||
Execute.Dispatcher = new DispatcherWrapper(Dispatcher.CurrentDispatcher);
|
||||
|
@ -92,7 +92,7 @@ namespace Stylet
|
|||
/// </summary>
|
||||
/// <param name="type">Type of instance to fetch</param>
|
||||
/// <returns>Fetched instance</returns>
|
||||
protected abstract object GetInstance(Type type);
|
||||
public abstract object GetInstance(Type type);
|
||||
|
||||
/// <summary>
|
||||
/// Hook called on application startup. This occurs before Start() is called (if autoStart is true)
|
||||
|
@ -110,15 +110,5 @@ namespace Stylet
|
|||
/// Hook called on an unhandled exception
|
||||
/// </summary>
|
||||
protected virtual void OnApplicationUnhandledExecption(object sender, DispatcherUnhandledExceptionEventArgs e) { }
|
||||
|
||||
IList<Assembly> IViewManagerConfig.Assemblies
|
||||
{
|
||||
get { return this.Assemblies; }
|
||||
}
|
||||
|
||||
object IViewManagerConfig.GetInstance(Type type)
|
||||
{
|
||||
return this.GetInstance(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace StyletUnitTests
|
|||
}
|
||||
|
||||
public bool GetInstanceCalled;
|
||||
protected override object GetInstance(Type service)
|
||||
public override object GetInstance(Type service)
|
||||
{
|
||||
this.GetInstanceCalled = true;
|
||||
if (service == typeof(IViewManager))
|
||||
|
|
|
@ -39,11 +39,6 @@ namespace StyletUnitTests
|
|||
builder.Bind<I1>().To<C1>();
|
||||
base.ConfigureIoC(builder);
|
||||
}
|
||||
|
||||
public new object GetInstance(Type type)
|
||||
{
|
||||
return base.GetInstance(type);
|
||||
}
|
||||
}
|
||||
|
||||
private MyBootstrapper<RootViewModel> bootstrapper;
|
||||
|
|
Loading…
Reference in New Issue