Вам не нужно устанавливать mangle в false, вы можете просто использовать ng-annotate и вызывать свой gulpfile.js следующим образом:
var ngAnnotate = require('gulp-ng-annotate')
...
gulp.task('scripts', function() {
return gulp.src('app/js/**/*.js')
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('default'))
.pipe(concat('main.js'))
.pipe(ngmin())
.pipe(gulp.dest('app/dist/js'))
.pipe(rename({suffix: '.min'}))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(gulp.dest('app/dist/js'))
.pipe(livereload(server))
.pipe(notify({ message: 'Scripts task complete' }));
});
работает над моими проектами для приложения в одном файле
вот способ чтения файла конфигурации и загрузки данных в простой в управлении объект:
Configuration c = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConfigurationSectionGroup csg = c.GetSectionGroup("system.serviceModel");
if (csg != null)
{
ConfigurationSection css = csg.Sections["client"];
if (css != null && css is ClientSection)
{
ClientSection cs = (ClientSection)csg.Sections["client"];
//make all your tests about the correcteness of the endpoints here
}
}
Объект «cs» откроет коллекция с именем "endpoints", которая позволяет вам получить доступ ко всем свойствам, которые вы найдете в файле конфигурации.
Убедитесь, что вы также обрабатываете ветви else элемента if и обрабатываете их как случаи сбоя (конфигурация недействительно).
Я хотел бы предложить улучшенную версию решения AlexDrenea , которая использует только специальные типы для разделов конфигурации.
Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ServiceModelSectionGroup serviceModelGroup = ServiceModelSectionGroup.GetSectionGroup(configuration);
if (serviceModelGroup != null)
{
ClientSection clientSection = serviceModelGroup.Client;
//make all your tests about the correcteness of the endpoints here
}