Skip to content

Commit

Permalink
Fixed bad xml comments (#5050)
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSenn committed May 14, 2022
1 parent 620b86c commit 8b623b6
Show file tree
Hide file tree
Showing 23 changed files with 85 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace HotChocolate.Types;

/// <summary>
/// Provides <see cref="IObjectFieldDescriptor"> extensions to handle JSON objects.
/// Provides <see cref="IObjectFieldDescriptor"/> extensions to handle JSON objects.
/// </summary>
public static class JsonObjectTypeExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace HotChocolate.Data.Filters;

/// <summary>
/// Represents a collection of <see cref="IFilterValueNode">
/// Represents a collection of <see cref="IFilterValueNode"/>
/// </summary>
public class FilterValueCollection : List<IFilterValueNode>, IFilterValueCollection
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using HotChocolate.Language;

namespace HotChocolate.Data.Filters;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace HotChocolate.Data.Filters;

/// <summary>
/// Represents a collection of <see cref="IFilterValueNode">
/// Represents a collection of <see cref="IFilterValueNode"/>
/// </summary>
public interface IFilterValueCollection : IEnumerable<IFilterValueNode>, IFilterValueNode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static class FilterConventionDescriptorExtensions
/// <see cref="IEnumerable{T}"/> on the convention
/// </summary>
/// <param name="descriptor">The descriptor where the handlers are registered</param>
/// <param name="compatabilityMode">Uses the old behaviour of naming the filters</param>
/// <returns>The descriptor that was passed in as a parameter</returns>
public static IFilterConventionDescriptor AddDefaults(
this IFilterConventionDescriptor descriptor,
Expand Down Expand Up @@ -80,6 +81,7 @@ public static class FilterConventionDescriptorExtensions
/// Binds common runtime types to the according <see cref="FilterInputType"/>
/// </summary>
/// <param name="descriptor">The descriptor where the handlers are registered</param>
/// <param name="compatabilityMode">Uses the old behaviour of naming the filters</param>
/// <returns>The descriptor that was passed in as a parameter</returns>
/// <exception cref="ArgumentNullException">
/// Throws in case the argument <paramref name="descriptor"/> is null
Expand Down Expand Up @@ -124,41 +126,41 @@ public static class FilterConventionDescriptorExtensions
else
{
return descriptor
.BindRuntimeType<string, StringOperationFilterInputType>()
.BindRuntimeType<bool, BooleanOperationFilterInputType>()
.BindRuntimeType<bool?, BooleanOperationFilterInputType>()
.BindRuntimeType<byte, ByteOperationFilterInputType>()
.BindRuntimeType<byte?, ByteOperationFilterInputType>()
.BindRuntimeType<sbyte, ByteOperationFilterInputType>()
.BindRuntimeType<sbyte?, ByteOperationFilterInputType>()
.BindRuntimeType<short, ShortOperationFilterInputType>()
.BindRuntimeType<short?, ShortOperationFilterInputType>()
.BindRuntimeType<int, IntOperationFilterInputType>()
.BindRuntimeType<int?, IntOperationFilterInputType>()
.BindRuntimeType<long, LongOperationFilterInputType>()
.BindRuntimeType<long?, LongOperationFilterInputType>()
.BindRuntimeType<float, FloatOperationFilterInputType>()
.BindRuntimeType<float?, FloatOperationFilterInputType>()
.BindRuntimeType<double, FloatOperationFilterInputType>()
.BindRuntimeType<double?, FloatOperationFilterInputType>()
.BindRuntimeType<decimal, DecimalOperationFilterInputType>()
.BindRuntimeType<decimal?, DecimalOperationFilterInputType>()
.BindRuntimeType<Guid, UuidOperationFilterInputType>()
.BindRuntimeType<Guid?, UuidOperationFilterInputType>()
.BindRuntimeType<DateTime, DateTimeOperationFilterInputType>()
.BindRuntimeType<DateTime?, DateTimeOperationFilterInputType>()
.BindRuntimeType<DateTimeOffset, DateTimeOperationFilterInputType>()
.BindRuntimeType<DateTimeOffset?, DateTimeOperationFilterInputType>()
.BindRuntimeType<string, StringOperationFilterInputType>()
.BindRuntimeType<bool, BooleanOperationFilterInputType>()
.BindRuntimeType<bool?, BooleanOperationFilterInputType>()
.BindRuntimeType<byte, ByteOperationFilterInputType>()
.BindRuntimeType<byte?, ByteOperationFilterInputType>()
.BindRuntimeType<sbyte, ByteOperationFilterInputType>()
.BindRuntimeType<sbyte?, ByteOperationFilterInputType>()
.BindRuntimeType<short, ShortOperationFilterInputType>()
.BindRuntimeType<short?, ShortOperationFilterInputType>()
.BindRuntimeType<int, IntOperationFilterInputType>()
.BindRuntimeType<int?, IntOperationFilterInputType>()
.BindRuntimeType<long, LongOperationFilterInputType>()
.BindRuntimeType<long?, LongOperationFilterInputType>()
.BindRuntimeType<float, FloatOperationFilterInputType>()
.BindRuntimeType<float?, FloatOperationFilterInputType>()
.BindRuntimeType<double, FloatOperationFilterInputType>()
.BindRuntimeType<double?, FloatOperationFilterInputType>()
.BindRuntimeType<decimal, DecimalOperationFilterInputType>()
.BindRuntimeType<decimal?, DecimalOperationFilterInputType>()
.BindRuntimeType<Guid, UuidOperationFilterInputType>()
.BindRuntimeType<Guid?, UuidOperationFilterInputType>()
.BindRuntimeType<DateTime, DateTimeOperationFilterInputType>()
.BindRuntimeType<DateTime?, DateTimeOperationFilterInputType>()
.BindRuntimeType<DateTimeOffset, DateTimeOperationFilterInputType>()
.BindRuntimeType<DateTimeOffset?, DateTimeOperationFilterInputType>()
#if NET6_0_OR_GREATER
.BindRuntimeType<DateOnly, DateOperationFilterInputType>()
.BindRuntimeType<DateOnly?, DateOperationFilterInputType>()
.BindRuntimeType<TimeOnly, TimeSpanOperationFilterInputType>()
.BindRuntimeType<TimeOnly?, TimeSpanOperationFilterInputType>()
#endif
.BindRuntimeType<TimeSpan, TimeSpanOperationFilterInputType>()
.BindRuntimeType<TimeSpan?, TimeSpanOperationFilterInputType>()
.BindRuntimeType<Uri, UrlOperationFilterInputType>()
.BindRuntimeType<Uri?, UrlOperationFilterInputType>();
.BindRuntimeType<TimeSpan, TimeSpanOperationFilterInputType>()
.BindRuntimeType<TimeSpan?, TimeSpanOperationFilterInputType>()
.BindRuntimeType<Uri, UrlOperationFilterInputType>()
.BindRuntimeType<Uri?, UrlOperationFilterInputType>();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public interface IFilterConvention : IConvention
/// The member from which a field shall be inferred.
/// </param>
/// <returns>
/// Returns a <see cref="RuntimeTypeReference"/> that represents the field type.
/// Returns a <see cref="ExtendedTypeReference"/> that represents the field type.
/// </returns>
ExtendedTypeReference GetFieldType(MemberInfo member);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using HotChocolate.Types;

namespace HotChocolate.Data.Filters;

Expand Down Expand Up @@ -43,8 +44,7 @@ public interface IFilterConventionDescriptor
/// <typeparam name="TFilterType">
/// The filter type for which additional configuration shall be provided.
/// </typeparam>
IFilterConventionDescriptor Configure<TFilterType>(
ConfigureFilterInputType configure)
IFilterConventionDescriptor Configure<TFilterType>(ConfigureFilterInputType configure)
where TFilterType : FilterInputType;

/// <summary>
Expand Down Expand Up @@ -86,7 +86,7 @@ IFilterConventionDescriptor Provider<TProvider>(TProvider provider)

/// <summary>
/// Defines the argument name of the filter used by
/// <see cref="FilterObjectFieldDescriptorExtensions.UseFiltering"/>
/// <see cref="FilterObjectFieldDescriptorExtensions.UseFiltering(IObjectFieldDescriptor, string?)"/>
/// </summary>
/// <param name="argumentName">The argument name.</param>
/// <exception cref="ArgumentNullException">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public abstract class QueryableListOperationHandlerBase
/// </summary>
/// <param name="context">The context of the visitor</param>
/// <param name="field">The currently visited filter field</param>
/// <param name="node">The object field node</param>
/// <param name="closureType">The runtime type of the scope</param>
/// <param name="lambda">The expression of the nested operations</param>
/// <returns></returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static class FilterSchemaBuilderExtensions
/// <param name="name">
/// The filter convention name.
/// </param>
/// <param name="compatabilityMode">Uses the old behaviour of naming the filters</param>
/// <returns>
/// Returns the <see cref="ISchemaBuilder"/>.
/// </returns>
Expand Down
33 changes: 13 additions & 20 deletions src/HotChocolate/Data/src/Data/Filters/FilterInputType.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using HotChocolate.Configuration;
using HotChocolate.Internal;
Expand Down Expand Up @@ -206,16 +204,14 @@ protected virtual void Configure(IFilterInputTypeDescriptor descriptor)
}
));

/// <summary>
/// Creates the configuration for the naming process of the inline filter types.
/// It uses the parent type name and the name of the field on which the new is applied,
/// to create a new typename
/// <example>
/// ParentTypeName: AuthorFilterInputType
/// Field: friends
/// Result: AuthorFriendsFilterInputType
/// </example>
/// </summary>
// Creates the configuration for the naming process of the inline filter types.
// It uses the parent type name and the name of the field on which the new is applied,
// to create a new typename
//
// ParentTypeName: AuthorFilterInputType
// Field: friends
// Result: AuthorFriendsFilterInputType
//
void CreateNamingConfiguration(
ITypeCompletionContext context,
FilterInputTypeDefinition definition)
Expand All @@ -230,17 +226,14 @@ protected virtual void Configure(IFilterInputTypeDescriptor descriptor)
definition.Name = convention.GetTypeName(parentFilterType, fieldDefinition);
}

/// <summary>
/// This configuration copies over the operations of the actual operation filter input to
/// the new one with the subset of the operations
/// </summary>
//
// This configuration copies over the operations of the actual operation filter input to
// the new one with the subset of the operations
//
void CreateOperationFieldConfiguration(
ITypeCompletionContext context,
FilterInputTypeDefinition definition)
{
IFilterInputType sourceType =
context.GetType<IFilterInputType>(filterOperationType);

// the handlers of the operations are attached to the original type. We have
// to copy them to the stripped down type
foreach (var userDefinedField in
Expand Down Expand Up @@ -270,7 +263,7 @@ protected virtual void Configure(IFilterInputTypeDescriptor descriptor)
parentType));
}

/// we copy over the entity type of the type source.
// we copy over the entity type of the type source.
definition.EntityType = sourceTypeDefinition.EntityType;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/HotChocolate/Data/src/Data/Filters/IFilterMetaData.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using HotChocolate.Data.Sorting.Expressions;

namespace HotChocolate.Data.Filters;

/// <summary>
/// Defines meta that for a filter field that the provider can use to build the database query
/// </summary>
/// <example><see cref="ExpressionSortMetadata "/></example>
/// <example><see cref="ExpressionSortMetadata"/></example>
#pragma warning disable CA1040 // Avoid empty interfaces
public interface IFilterMetadata
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace HotChocolate.Data.Filters;

/// <summary>
/// This is an input type descriptor for lists. This is sloley used for the inline customization
/// for filtering. <see cref=""></see>
/// for filtering.
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IListOperationTypeDescriptor<T> : IFilterInputTypeDescriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static class ListFilterDescriptorExtensions
/// Defines a <see cref="FilterField" /> that binds to the specified property and also
/// configures the type of the field
/// </summary>
/// <param name="descriptor">The descriptor</param>
/// <param name="propertyOrMember">
/// The property to which a filter field shall be bound.
/// </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace HotChocolate.Data.Filters;

/// <summary>
/// This is an input type descriptor for lists. This is sloley used for the inline customization
/// for filtering. <see cref=""></see>
/// for filtering.
/// </summary>
/// <typeparam name="T"></typeparam>
public class ListOperationTypeDescriptor<T> : IListOperationTypeDescriptor<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static class ListOperationTypeDescriptorExtensions
/// <summary>
/// Allows the operation `All` on the type
/// </summary>
/// <param name="descriptor">The descriptor</param>
/// <param name="configure">The configuration of the type of the field</param>
public static IFilterOperationFieldDescriptor AllowAll<T>(
this IListOperationTypeDescriptor<T> descriptor,
Expand All @@ -24,6 +25,7 @@ public static class ListOperationTypeDescriptorExtensions
/// <summary>
/// Allows the operation `Some` on the type
/// </summary>
/// <param name="descriptor">The descriptor</param>
/// <param name="configure">The configuration of the type of the field</param>
public static IFilterOperationFieldDescriptor AllowSome<T>(
this IListOperationTypeDescriptor<T> descriptor,
Expand All @@ -37,6 +39,7 @@ public static class ListOperationTypeDescriptorExtensions
/// <summary>
/// Allows the operation `None` on the type
/// </summary>
/// <param name="descriptor">The descriptor</param>
/// <param name="configure">The configuration of the type of the field</param>
public static IFilterOperationFieldDescriptor AllowNone<T>(
this IListOperationTypeDescriptor<T> descriptor,
Expand All @@ -50,7 +53,7 @@ public static class ListOperationTypeDescriptorExtensions
/// <summary>
/// Allows the operation `Any` on the type
/// </summary>
/// <param name="configure">The configuration of the type of the field</param>
/// <param name="descriptor">The descriptor</param>
public static IFilterOperationFieldDescriptor AllowAny<T>(
this IListOperationTypeDescriptor<T> descriptor)
=> descriptor.Operation(DefaultFilterOperations.Any);
Expand All @@ -70,11 +73,10 @@ public static class ListOperationTypeDescriptorExtensions
IDescriptorContext context,
string? scope)
{
FilterInputTypeDescriptor<T> descriptor =
FilterInputTypeDescriptor.Inline<T>(context, typeof(T), scope);
var d = FilterInputTypeDescriptor.Inline<T>(context, typeof(T), scope);

configure(descriptor);
return descriptor.CreateDefinition();
configure(d);
return d.CreateDefinition();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public abstract class FilterOperationHandler<TContext, T>
/// <param name="context">The <see cref="IFilterVisitorContext{T}"/> of the visitor</param>
/// <param name="field">The field that is currently being visited</param>
/// <param name="node">The value node of this field</param>
/// <param name="result">Outputs the result when the operation was handled correctly</param>
/// <returns>If <c>true</c> is returned the action is used for further processing</returns>
public virtual bool TryHandleOperation(
TContext context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IProjectionFieldHandler<TContext>
/// <param name="context">The context of the <see cref="IProjectionVisitorContext"/></param>
/// <param name="selection">The current selection</param>
/// <returns>
/// The instance of <see cref="TContext"/> that is used in TryHandleEnter
/// The instance of <typeparamref name="TContext"/> that is used in TryHandleEnter
/// </returns>
TContext OnBeforeEnter(TContext context, ISelection selection);

Expand Down Expand Up @@ -44,7 +44,7 @@ public interface IProjectionFieldHandler<TContext>
/// <param name="selection">The current selection</param>
/// <param name="result">The action produced by TryHandleEnter</param>
/// <returns>
/// The instance of <see cref="TContext"/> that is used in on leave
/// The instance of <typeparamref name="TContext"/> that is used in on leave
/// </returns>
TContext OnAfterEnter(
TContext context,
Expand All @@ -58,7 +58,7 @@ public interface IProjectionFieldHandler<TContext>
/// <param name="context">The context of the <see cref="IProjectionVisitorContext"/></param>
/// <param name="selection">The current selection</param>
/// <returns>
/// The instance of <see cref="TContext"/> that is used in TryHandleLeave
/// The instance of <typeparamref name="TContext"/> that is used in TryHandleLeave
/// </returns>
TContext OnBeforeLeave(TContext context, ISelection selection);

Expand Down Expand Up @@ -87,7 +87,7 @@ public interface IProjectionFieldHandler<TContext>
/// <param name="result">The action produced by TryHandleLeave</param>
/// <param name="selection">The current selection</param>
/// <returns>
/// The instance of <see cref="TContext"/> that is used in TryHandleLeave
/// The instance of <typeparamref name="TContext"/> that is used in TryHandleLeave
/// </returns>
TContext OnAfterLeave(
TContext context,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using HotChocolate.Language;

namespace HotChocolate.Data.Sorting;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace HotChocolate.Data.Sorting;

/// <summary>
/// Represents a collection of <see cref="ISortingValueNode">
/// Represents a collection of <see cref="ISortingValueNode"/>
/// </summary>
public interface ISortingValueCollection
: IEnumerable<ISortingValueNode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace HotChocolate.Data.Sorting;

/// <summary>
/// Represents a collection of <see cref="ISortingValueNode">
/// Represents a collection of <see cref="ISortingValueNode"/>
/// </summary>
public class SortingValueCollection : List<ISortingValueNode>, ISortingValueCollection
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public interface ISortConvention : IConvention
/// The member from which a field shall be inferred.
/// </param>
/// <returns>
/// Returns a <see cref="ClrTypeReference"/> that represents the field type.
/// Returns a <see cref="ExtendedTypeReference"/> that represents the field type.
/// </returns>
ExtendedTypeReference GetFieldType(MemberInfo member);

Expand Down

0 comments on commit 8b623b6

Please sign in to comment.