public void ValidateRequest(ApiRequest request) { if (Method != HttpMethod.Any) { if (!request.HttpMethod.Equals(Method.ToString(), StringComparison.InvariantCultureIgnoreCase)) { throw new ApiV2Exception($"method not allowed"); } } if (ClientId != null) { if (!ClientId.Any(x => x == request.ClientId)) { throw new ApiV2Exception($"clientId not allowed"); } } }