コード例 #1
0
        public void OnViewRemove(IView view)
        {
            if (!_mediators.TryGetValue(view, out var mediator))
            {
                throw new MediationException(MediationExceptionType.ViewInstanceNotFoundForRemoval, view.GetType().FullName);
            }

            if (mediator != null)
            {
                _injectionBinder.Destroy(mediator, true);
            }

            _injectionBinder.Destroy(view, true);

            _mediators.Remove(view);
        }
コード例 #2
0
 public static T Destroy <T>(this T instance, IInjectionBinder injectionBinder, bool triggerPreDestroys) where T : class
 {
     injectionBinder.Destroy(instance, triggerPreDestroys);
     return(null);
 }