public FindResult(List<ArgInstance> instances, ExecutionLog errorLog, ExecutionLog warningLog) { Instances = instances; IndexedInstances = new IndexedArgInstances(instances); ErrorLog = errorLog; WarningLog = warningLog; Success = (errorLog.Count == 0); }
public ParseResult(bool success, MultiDictionary<string, string> arguments, ExecutionLog errorLog) { Success = success; Arguments = arguments; ErrorLog = errorLog; }
private void SetArgInstanceValueOrAddError(ArgInstance instance, List<string> values, ExecutionLog errorLog) { Type fieldType = instance.Field.FieldType; if (fieldType.IsArray) { instance.Field.SetValue(instance.ParentObject, CreateFieldValueForArray(fieldType, values)); } else { if (values.Count == 1) { instance.Field.SetValue(instance.ParentObject, CreateFieldValue(fieldType, values[0])); } else { errorLog.Add("Multiple values passed for argument [{0}]. Values are [{1}].", instance.FullName, string.Join(", ", values)); } } }