Index: Src/GoogleApis/Apis/Requests/Parameters/ParameterValidator.cs =================================================================== rename from Src/GoogleApis/Apis/Requests/ParameterValidator.cs rename to Src/GoogleApis/Apis/Requests/Parameters/ParameterValidator.cs --- a/Src/GoogleApis/Apis/Requests/ParameterValidator.cs +++ b/Src/GoogleApis/Apis/Requests/Parameters/ParameterValidator.cs @@ -22,30 +22,28 @@ using Google.Apis.Testing; using Google.Apis.Util; -namespace Google.Apis +namespace Google.Apis.Requests.Parameters { - /// - /// Logic for validating a parameter - /// + /// Logic for validating a parameter. public static class ParameterValidator { - /// Validates a parameter value against the methods regex. + /// Validates a parameter value against the methods regex. [VisibleForTestOnly] internal static bool ValidateRegex(IParameter param, string paramValue) { return string.IsNullOrEmpty(param.Pattern) || new Regex(param.Pattern).IsMatch(paramValue); } - /// Validates if a parameter is valid. + /// Validates if a parameter is valid. public static bool ValidateParameter(IParameter parameter, string value) { - // If a required parameter is not present, fail + // Fail if a required parameter is not present. if (String.IsNullOrEmpty(value)) { return !parameter.IsRequired; } - // The parameter has value so validate the regex + // The parameter has value so validate the regex. return ValidateRegex(parameter, value); } }