private void AppendArgument(DependencyCheckSettings settings, ProcessArgumentBuilder arguments, PropertyInfo property)
        {
            var attr = property.GetCustomAttributes <ArgumentAttribute>().FirstOrDefault();

            if (attr == null)
            {
                return;
            }

            var value = property.GetValue(settings);

            if (value == null)
            {
                return;
            }

            if (attr.HasValue)
            {
                appendString(arguments, attr.Name, value);
            }
            else
            {
                appendBoolean(arguments, attr.Name, value);
            }
        }
        /// <summary>
        /// This method searching all filled settings and append them to arguments.
        /// </summary>
        /// <param name="settings">A required settings object.</param>
        /// <param name="arguments">A required arguments object.</param>
        public void AppendArguments(DependencyCheckSettings settings, ProcessArgumentBuilder arguments)
        {
            foreach (var property in settings.GetType().GetProperties())
            {
                AppendArgument(settings, arguments, property);
            }

            if (settings.ArgumentCustomization != null)
            {
                arguments = settings.ArgumentCustomization(arguments);
                settings.ArgumentCustomization = null;
            }
        }
        public static void DependencyCheck(this ICakeContext context, DependencyCheckSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

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

            runner.RunDependencyCheck(settings);
        }