mirror of https://github.com/AMT-Cheif/Stylet.git
Bootstrappers: Make RootViewModel strongly typed
This commit is contained in:
parent
acf78533eb
commit
6f67844970
|
@ -12,10 +12,10 @@ namespace Bootstrappers
|
||||||
{
|
{
|
||||||
private IContainer container;
|
private IContainer container;
|
||||||
|
|
||||||
private object _rootViewModel;
|
private TRootViewModel _rootViewModel;
|
||||||
protected virtual object RootViewModel
|
protected virtual TRootViewModel RootViewModel
|
||||||
{
|
{
|
||||||
get { return this._rootViewModel ?? (this._rootViewModel = this.GetInstance(typeof(TRootViewModel))); }
|
get { return this._rootViewModel ?? (this._rootViewModel = (TRootViewModel)this.GetInstance(typeof(TRootViewModel))); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ConfigureBootstrapper()
|
protected override void ConfigureBootstrapper()
|
||||||
|
|
|
@ -14,10 +14,10 @@ namespace Bootstrappers
|
||||||
{
|
{
|
||||||
private IWindsorContainer container;
|
private IWindsorContainer container;
|
||||||
|
|
||||||
private object _rootViewModel;
|
private TRootViewModel _rootViewModel;
|
||||||
protected virtual object RootViewModel
|
protected virtual TRootViewModel RootViewModel
|
||||||
{
|
{
|
||||||
get { return this._rootViewModel ?? (this._rootViewModel = this.GetInstance(typeof(TRootViewModel))); }
|
get { return this._rootViewModel ?? (this._rootViewModel = (TRootViewModel)this.GetInstance(typeof(TRootViewModel))); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ConfigureBootstrapper()
|
protected override void ConfigureBootstrapper()
|
||||||
|
|
|
@ -11,10 +11,10 @@ namespace Bootstrappers
|
||||||
{
|
{
|
||||||
private ServiceProvider serviceProvider;
|
private ServiceProvider serviceProvider;
|
||||||
|
|
||||||
private object _rootViewModel;
|
private TRootViewModel _rootViewModel;
|
||||||
protected virtual object RootViewModel
|
protected virtual TRootViewModel RootViewModel
|
||||||
{
|
{
|
||||||
get { return this._rootViewModel ?? (this._rootViewModel = this.GetInstance(typeof(TRootViewModel))); }
|
get { return this._rootViewModel ?? (this._rootViewModel = (TRootViewModel)this.GetInstance(typeof(TRootViewModel))); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public IServiceProvider ServiceProvider
|
public IServiceProvider ServiceProvider
|
||||||
|
|
|
@ -11,10 +11,10 @@ namespace Bootstrappers
|
||||||
{
|
{
|
||||||
private IKernel kernel;
|
private IKernel kernel;
|
||||||
|
|
||||||
private object _rootViewModel;
|
private TRootViewModel _rootViewModel;
|
||||||
protected virtual object RootViewModel
|
protected virtual TRootViewModel RootViewModel
|
||||||
{
|
{
|
||||||
get { return this._rootViewModel ?? (this._rootViewModel = this.GetInstance(typeof(TRootViewModel))); }
|
get { return this._rootViewModel ?? (this._rootViewModel = (TRootViewModel)this.GetInstance(typeof(TRootViewModel))); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ConfigureBootstrapper()
|
protected override void ConfigureBootstrapper()
|
||||||
|
|
|
@ -12,10 +12,10 @@ namespace Bootstrappers
|
||||||
{
|
{
|
||||||
private IContainer container;
|
private IContainer container;
|
||||||
|
|
||||||
private object _rootViewModel;
|
private TRootViewModel _rootViewModel;
|
||||||
protected virtual object RootViewModel
|
protected virtual TRootViewModel RootViewModel
|
||||||
{
|
{
|
||||||
get { return this._rootViewModel ?? (this._rootViewModel = this.GetInstance(typeof(TRootViewModel))); }
|
get { return this._rootViewModel ?? (this._rootViewModel = (TRootViewModel)this.GetInstance(typeof(TRootViewModel))); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ConfigureBootstrapper()
|
protected override void ConfigureBootstrapper()
|
||||||
|
|
|
@ -11,10 +11,10 @@ namespace Bootstrappers
|
||||||
{
|
{
|
||||||
private IUnityContainer container;
|
private IUnityContainer container;
|
||||||
|
|
||||||
private object _rootViewModel;
|
private TRootViewModel _rootViewModel;
|
||||||
protected virtual object RootViewModel
|
protected virtual TRootViewModel RootViewModel
|
||||||
{
|
{
|
||||||
get { return this._rootViewModel ?? (this._rootViewModel = this.GetInstance(typeof(TRootViewModel))); }
|
get { return this._rootViewModel ?? (this._rootViewModel = (TRootViewModel)this.GetInstance(typeof(TRootViewModel))); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void ConfigureBootstrapper()
|
protected override void ConfigureBootstrapper()
|
||||||
|
|
Loading…
Reference in New Issue