Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
Corrected exception details
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Pilley authored and Trevor Pilley committed Oct 30, 2019
1 parent 3301499 commit adec1c7
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Net.Http.WebApi.OData/Model/EdmComplexType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal EdmComplexType(Type clrType, EdmType baseType, IReadOnlyList<EdmPropert
/// </summary>
/// <param name="name">The name of the property.</param>
/// <returns>The <see cref="EdmProperty"/> declared in this type with the specified name.</returns>
/// <exception cref="System.ArgumentException">The type does not contain a property with the specified name.</exception>
/// <exception cref="ArgumentException">The type does not contain a property with the specified name.</exception>
public EdmProperty GetProperty(string name)
{
for (int i = 0; i < this.Properties.Count; i++)
Expand Down
4 changes: 2 additions & 2 deletions Net.Http.WebApi.OData/Model/EdmProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public sealed class EdmProperty
/// <param name="name">The name of the property.</param>
/// <param name="propertyType">Type of the edm.</param>
/// <param name="declaringType">Type of the declaring.</param>
/// <exception cref="System.ArgumentException">Property name must be specified.</exception>
/// <exception cref="System.ArgumentNullException">Property type and declaring type must be specified.</exception>
/// <exception cref="ArgumentException">Property name must be specified.</exception>
/// <exception cref="ArgumentNullException">Property type and declaring type must be specified.</exception>
internal EdmProperty(string name, EdmType propertyType, EdmComplexType declaringType)
{
if (string.IsNullOrWhiteSpace(name))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Bind(FilterQueryOption filterQueryOption)
/// Binds the specified <see cref="QueryNode"/>.
/// </summary>
/// <param name="queryNode">The <see cref="QueryNode"/> to bind.</param>
/// <exception cref="System.NotSupportedException">Thrown if the <see cref="QueryNodeKind"/> is not supported.</exception>
/// <exception cref="NotSupportedException">Thrown if the <see cref="QueryNodeKind"/> is not supported.</exception>
protected void Bind(QueryNode queryNode)
{
if (queryNode is null)
Expand Down
2 changes: 1 addition & 1 deletion Net.Http.WebApi.OData/Query/QueryOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class QueryOption
/// Initialises a new instance of the <see cref="QueryOption"/> class.
/// </summary>
/// <param name="rawValue">The raw value.</param>
/// <exception cref="System.ArgumentNullException">Thrown if raw value is null.</exception>
/// <exception cref="ArgumentNullException">Thrown if raw value is null.</exception>
protected QueryOption(string rawValue)
{
this.RawValue = rawValue ?? throw new ArgumentNullException(nameof(rawValue));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $count query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class CountQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Count is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $expand query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class ExpandQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Expand is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $filter query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class FilterQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.Filter is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $format query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class FormatQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Format is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $orderby query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class OrderByQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.OrderBy is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $search query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class SearchQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Search is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $select query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class SelectQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Select is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $skip query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class SkipQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Skip is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $skiptoken query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -25,7 +24,7 @@ internal static class SkipTokenQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.SkipToken is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Net.Http.WebApi.OData.Query.Validators
{
using System.Globalization;
using System.Net;
using System.Web.Http;

/// <summary>
/// A class which validates the $top query option based upon the <see cref="ODataValidationSettings"/>.
Expand All @@ -26,7 +25,7 @@ internal static class TopQueryOptionValidator
/// </summary>
/// <param name="queryOptions">The query options.</param>
/// <param name="validationSettings">The validation settings.</param>
/// <exception cref="HttpResponseException">Thrown if the validation fails.</exception>
/// <exception cref="ODataException">Thrown if the validation fails.</exception>
internal static void Validate(ODataQueryOptions queryOptions, ODataValidationSettings validationSettings)
{
if (queryOptions.RawValues.Top is null)
Expand Down

0 comments on commit adec1c7

Please sign in to comment.