private void Clear() { foreach (var section in sections) { lookup.RemoveSection(section); } viewModelDependency.OnCleared(); foreach (var section in sections) { section.Dispose(); } sections.Clear(); }
/// <summary> /// Removes a Configuration Environment from the application. /// </summary> /// <param name="environment">The <see cref="EnvironmentSourceViewModel"/> that should be removed.</param> public void RemoveEnvironment(EnvironmentSourceViewModel environment) { lookup.RemoveSection(environment); environments.Remove(environment); }
protected override void Act() { ElementLookup lookup = Container.Resolve <ElementLookup>(); lookup.RemoveSection(sectionViewModel); }