/* * Context. */ private void ProcessContextIntegration(IContext context) { Context.OnContextStarted -= ProcessContextIntegration; _context = context; _context.OnStopping += OnContextStopping; var mvcs = _context.GetExtension <MVCSExtension>(); _viewEventProcessor = mvcs.InjectionBinder.GetInstance <IUnityViewEventProcessor>(); _mediationBinder = mvcs.MediationBinder; _mediationBinder.OnViewAdd(this); Initialized = true; }
private void DisposeContextIntegration() { Context.OnContextStarted -= ProcessContextIntegration; if (_mediationBinder != null) { _mediationBinder?.OnViewRemove(this); _mediationBinder = null; } if (_context != null) { _context.OnStopping -= OnContextStopping; _context = null; } _viewEventProcessor = null; Initialized = false; }