public void Build(ParameterSourceLocator sourceLocator) { if (sourceLocator.Type != ParameterSourceType.PropertyFile) { throw new ArgumentException(String.Format( "The locator must be of type '{0}'. The type provided was '{1}'.", ParameterSourceType.PropertyFile, sourceLocator.Type)); } Build(new FileInfo(sourceLocator.Path)); }
public BuilderError(object target, ParameterSourceLocator sourceLocator, IEnumerable <string> messages, IEnumerable <Exception> exceptions) : this() { Target = target; SourceLocator = sourceLocator; if (messages != null) { foreach (var msg in messages.Where(msg => !String.IsNullOrEmpty(msg))) { Messages.Add(msg); } } if (exceptions == null) { return; } foreach (var ex in exceptions.Where(ex => ex != null)) { Exceptions.Add(ex); } }
public IParameterForest Build(ParameterSourceLocator sourceLocator) { return(Build(new[] { sourceLocator })); }
public BuilderError(object target, ParameterSourceLocator sourceLocator, string message, IEnumerable <Exception> exceptions) : this(target, sourceLocator, new[] { message }, exceptions) { }
public BuilderError(object target, ParameterSourceLocator sourceLocator, string message, Exception exception) : this(target, sourceLocator, new[] { message }, new[] { exception }) { }
public BuilderError(object target, ParameterSourceLocator sourceLocator, string message) : this(target, sourceLocator, new[] { message }, null) { }
public BuilderError(ParameterSourceLocator sourceLocator, string message) : this(null, sourceLocator, new[] { message }, null) { }
public BuilderError(ParameterSourceLocator sourceLocator, IEnumerable <string> messages) : this(null, sourceLocator, messages, null) { }
public void Build(ParameterSourceLocator sourceLocator) { var rootDir = sourceLocator.Path; Build(rootDir, DefaultSearchPattern); }