Exemple #1
0
        void EmitBuildParameter(LogRotateOptionsBuilder builder, string line)
        {
            var match = Regex.Match(line, @"^\s*(?<name>\S+)(\s+(?<val>.*?))?\s*$");

            if (!match.Success)
            {
                throw new InvalidOperationException("invalid config " + line);
            }
            var name  = match.Groups["name"].Value;
            var value = match.Groups["val"].Value.TrimEnd();

            builder.AddBuildParameter(name, string.IsNullOrEmpty(value) ? null : value);
        }