예제 #1
0
        public static void NDependAnalyse(this ICakeContext context, NDependSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            if (!settings.ValidateSettingOptions())
            {
                throw new NDependSettingsOptionException(settings.InvalidOption);
            }

            var runner = new NDependConsoleRunner(
                context.FileSystem,
                context.Environment,
                context.ProcessRunner,
                context.Tools,
                settings);

            var result = runner.Run();

            if (result != 0)
            {
                throw new NDependConsoleRunnerException("NDepend Console runner return non-zero result.");
            }
        }
 /// <summary>
 ///     Default ctor.
 /// </summary>
 /// <param name="settingsOptionName">The settings option name.</param>
 /// <param name="settings">The NDepend settings.</param>
 internal ProcessArgumentStringCollection(string settingsOptionName, NDependSettings settings)
 {
     _settingsOptionName = settingsOptionName;
     _settings           = settings;
 }
예제 #3
0
 /// <summary>
 ///     Default ctor.
 /// </summary>
 /// <param name="settingsOptionName">The settings option name.</param>
 /// <param name="settings">The NDepend settings.</param>
 internal ProcessArgumentBool(string settingsOptionName, NDependSettings settings)
 {
     _settingsOptionName = settingsOptionName;
     _settings           = settings;
 }
 /// <summary>
 ///     Default ctor.
 /// </summary>
 /// <param name="settings">The NDepend settings.</param>
 internal ProcessArgumentProject(NDependSettings settings)
 {
     _settings = settings;
 }