public MvvmViewControllerMediator([NotNull] UIViewController viewController) { Should.NotBeNull(viewController, "viewController"); _viewController = ServiceProvider.WeakReferenceFactory(viewController); _canDispose = true; var viewModel = viewController.DataContext() as IViewModel; if (viewModel == null || !viewModel.Settings.Metadata.Contains(ViewModelConstants.StateNotNeeded)) { viewController.InititalizeRestorationIdentifier(); } }