public bool Save(IDesignConfigurationSource configurationSource)
        {
            saveOperation.BeginPerformSaveOperation();
            try
            {
                var sectionsToSave = Sections.Where(x => null == x as EnvironmentSourceViewModel);

                var sectionSaveSource = GetSectionSourceFromModel(configurationSource);
                if (sectionSaveSource != null)
                {
                    try
                    {
                        try
                        {
                            SaveConfigurationSource(configurationSource);
                        }
                        catch (Exception e)
                        {
                            ConfigurationLogWriter.LogException(e);
                            uiService.ShowError(e, Resources.ErrorSavingConfigurationSourceOnMainFile);
                            return(false);
                        }
                        try
                        {
                            SaveSections(
                                sectionsToSave.Where(
                                    x => !typeof(ConfigurationSourceSection).IsAssignableFrom(x.ConfigurationType)),
                                sectionSaveSource);
                        }
                        catch (Exception e)
                        {
                            ConfigurationLogWriter.LogException(e);
                            uiService.ShowError(e, Resources.ErrorSavingConfigurationSectionsOnSelectedSource);
                            return(false);
                        }
                        return(true);
                    }
                    finally
                    {
                        var disposable = sectionSaveSource as IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                }

                try
                {
                    SaveSections(sectionsToSave, configurationSource);
                }
                catch (Exception e)
                {
                    ConfigurationLogWriter.LogException(e);
                    uiService.ShowError(e, Resources.ErrorSavingConfigurationSectionsOnMainFile);
                    return(false);
                }
            }
            finally
            {
                saveOperation.EndPerformSaveOperation();
            }
            return(true);
        }