/// <summary> /// Called when the dataset should be deactivated. /// </summary> /// <param name="projectFacade">The object that contains the methods that allow interaction with the project system.</param> /// <param name="dataset">The dataset.</param> /// <param name="timer">The function that creates and stores timing intervals.</param> private static void OnDeactivate(ILinkToProjects projectFacade, DatasetFacade dataset, Func<string, IDisposable> timer) { // If there is no application facade, then we're in // designer mode, or something else silly. if (dataset == null) { return; } if (!dataset.IsActivated) { return; } using (timer("Unloading dataset")) { dataset.Deactivate(); projectFacade.ActiveProject().History.Mark(); } }
/// <summary> /// Deactivates the dataset. /// </summary> public void Deactivate() { m_Dataset.Deactivate(); }