public virtual bool IsRegistered <T>() where T : Presenter { return(EH.Any( EH.OfType <T>( this.presenters))); }
public override void PresentFluidly <T>( string name) { NamedPresenter np; lock (this.locker) { var matchingPresenters = EH.OfType <T>( this.presenters); foreach (var presenter in matchingPresenters) { if (presenter.Name != name) { continue; } np = presenter; goto start; } } return; start: this.startPresenter?.Invoke(np); }
public override bool IsRegistered <T>() { lock (this.locker) { return(EH.Any( EH.OfType <T>( this.presenters))); } }
public virtual bool IsRegistered <T>( string name) where T : NamedPresenter { return(EH.Any( EH.OfType <T>( this.presenters), p => p.Name == name)); }
public virtual void StopPresenter <T>() where T : Presenter { foreach (var presenter in EH.OfType <T>( this.presenters)) { presenter?.Stop(); break; } }
public override bool IsRegistered <T>( string name) { lock (this.locker) { return(EH.Any( EH.OfType <T>( this.presenters), p => p.Name == name)); } }
public override void StopPresenter <T>() { lock (this.locker) { foreach (var presenter in EH.OfType <T>( this.presenters)) { presenter.Stop(); break; } } }
public virtual void StopPresenter <T>( string name) where T : NamedPresenter { foreach (var presenter in EH.Where( EH.OfType <T>( this.presenters), p => p.Name == name)) { presenter?.Stop(); break; } }
public override void StopPresenter <T>( string name) { lock (this.locker) { foreach (var presenter in EH.Where( EH.OfType <T>( this.presenters), p => p.Name == name)) { presenter.Stop(); break; } } }
public virtual bool Unregister <T>() where T : Presenter { var ps = this.presenters; bool unregistered = falsity; lock (this.locker) { foreach (var p in EH.OfType <T>(ps)) { unregistered = ps.Remove(p); break; } } return(unregistered); }
public virtual void PresentFluidly <T>( string name) where T : NamedPresenter { var matchingPresenters = EH.OfType <T>( this.presenters); foreach (var presenter in matchingPresenters) { if (presenter.Name != name) { continue; } this.startPresenter?.Invoke(presenter); break; } }
public virtual bool Unregister <T>( string name) where T : NamedPresenter { var ps = this.presenters; bool unregistered = falsity; lock (this.locker) { foreach (var p in EH.OfType <T>(ps)) { if (p.Name != name) { continue; } unregistered = ps.Remove(p); break; } } return(unregistered); }
public virtual void Present <T>( string name) where T : NamedPresenter { var ps = this.presenters; var matchingPresenters = EH.OfType <T>(ps); foreach (var presenter in matchingPresenters) { if (presenter.Name != name) { continue; } foreach (var p in ps) { p?.Stop(); } this.startPresenter?.Invoke(presenter); break; } }