示例#1
0
        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));
        }
示例#2
0
 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 }));
 }
示例#4
0
 public BuilderError(object target, ParameterSourceLocator sourceLocator, string message, IEnumerable <Exception> exceptions)
     : this(target, sourceLocator, new[] { message }, exceptions)
 {
 }
示例#5
0
 public BuilderError(object target, ParameterSourceLocator sourceLocator, string message, Exception exception)
     : this(target, sourceLocator, new[] { message }, new[] { exception })
 {
 }
示例#6
0
 public BuilderError(object target, ParameterSourceLocator sourceLocator, string message)
     : this(target, sourceLocator, new[] { message }, null)
 {
 }
示例#7
0
 public BuilderError(ParameterSourceLocator sourceLocator, string message)
     : this(null, sourceLocator, new[] { message }, null)
 {
 }
示例#8
0
 public BuilderError(ParameterSourceLocator sourceLocator, IEnumerable <string> messages)
     : this(null, sourceLocator, messages, null)
 {
 }
示例#9
0
 public void Build(ParameterSourceLocator sourceLocator)
 {
     var rootDir = sourceLocator.Path;
     Build(rootDir, DefaultSearchPattern);
 }