Skip to content

Commit

Permalink
Fixed XML Documentation Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Jul 12, 2022
1 parent e0a7f6b commit cad7eaf
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 82 deletions.
4 changes: 2 additions & 2 deletions src/GreenDonut/src/Core/DataLoaderDiagnosticEventListener.cs
Expand Up @@ -10,7 +10,7 @@ namespace GreenDonut;
public class DataLoaderDiagnosticEventListener : IDataLoaderDiagnosticEventListener
{
/// <summary>
/// A no-op <see cref="IActivityScope"/> that can be returned from
/// A no-op <see cref="IDisposable"/> that can be returned from
/// event methods that are not interested in when the scope is disposed.
/// </summary>
protected static IDisposable EmptyScope { get; } = new EmptyActivityScope();
Expand Down Expand Up @@ -56,4 +56,4 @@ public void Dispose()
{
}
}
}
}
Expand Up @@ -15,7 +15,7 @@ public interface ISocket
bool IsClosed { get; }

/// <summary>
/// Reads a message from a socket and writes them to the specified <param name="writer" />.
/// Reads a message from a socket and writes them to the specified <paramref name="writer" />.
/// </summary>
/// <param name="writer">
/// The writer to which the message is written to.
Expand Down
6 changes: 3 additions & 3 deletions src/HotChocolate/Core/src/Types/Contracts/ISchemaBuilder.cs
Expand Up @@ -113,7 +113,7 @@ public interface ISchemaBuilder
/// This type must inherit from <see cref="ObjectType{T}"/> or be a class.
/// </param>
/// <param name="operation">
/// The operation type that <see cref="rootType"/> represents.
/// The operation type that <paramref name="rootType"/> represents.
/// </param>
/// <returns>
/// Returns the schema builder to chain in further configuration.
Expand All @@ -122,7 +122,7 @@ public interface ISchemaBuilder
/// <paramref name="rootType"/> is null.
/// </exception>
/// <exception cref="ArgumentException">
/// - <see cref="rootType"/> is either not a class or is not inheriting from
/// - <paramref name="rootType"/> is either not a class or is not inheriting from
/// <see cref="ObjectType{T}"/>.
///
/// - A root type for the specified <paramref name="operation"/> was already set.
Expand All @@ -136,7 +136,7 @@ public interface ISchemaBuilder
/// An instance of <see cref="ObjectType"/> that represents a root type.
/// </param>
/// <param name="operation">
/// The operation type that <see cref="rootType"/> represents.
/// The operation type that <paramref name="rootType"/> represents.
/// </param>
/// <returns>
/// Returns the schema builder to chain in further configuration.
Expand Down
2 changes: 1 addition & 1 deletion src/HotChocolate/Core/src/Types/Internal/IExtendedType.cs
Expand Up @@ -18,7 +18,7 @@ public interface IExtendedType : IEquatable<IExtendedType>
/// <summary>
/// Gets the original type representation.
/// In case of a nullable int the original type will be
/// <see cref="Nullable{int}"/>.
/// <see cref="Nullable{T}"/>.
/// </summary>
Type Source { get; }

Expand Down
Expand Up @@ -32,9 +32,6 @@ public interface IParameterExpressionBuilder : IParameterHandler
/// <param name="parameter">
/// The parameter that needs to be resolved.
/// </param>
/// <param name="source">
/// The runtime type of the object that is being resolved.
/// </param>
/// <param name="context">
/// An expression that represents the resolver context.
/// </param>
Expand Down
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Resolvers/ArgumentValue.cs
Expand Up @@ -35,7 +35,7 @@ public sealed class ArgumentValue : IInputFieldInfo
/// The syntax value representation.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="argument"/> or <param name="valueLiteral"></param> is <c>null</c>.
/// <paramref name="argument"/> or <paramref name="valueLiteral" /> is <c>null</c>.
/// </exception>
public ArgumentValue(
IInputFieldInfo argument,
Expand All @@ -61,7 +61,7 @@ public sealed class ArgumentValue : IInputFieldInfo
/// <param name="argument">The argument.</param>
/// <param name="error">The argument value error.</param>
/// <exception cref="ArgumentNullException">
/// <paramref name="argument"/> or <param name="error"></param> is <c>null</c>.
/// <paramref name="argument"/> or <paramref name="error" /> is <c>null</c>.
/// </exception>
public ArgumentValue(IInputFieldInfo argument, IError error)
{
Expand Down
Expand Up @@ -99,7 +99,7 @@ public interface IResolverContext : IPureResolverContext
void ReportError(Exception exception, Action<IErrorBuilder>? configure = null);

/// <summary>
/// Gets the pre-compiled selections for the <paramref name="selectionSet" />
/// Gets the pre-compiled selections for the selection-set
/// with the specified <paramref name="typeContext" />.
/// type context.
/// </summary>
Expand Down
Expand Up @@ -31,7 +31,7 @@ public interface IObjectType : IComplexOutputType
/// The result that shall be checked.
/// </param>
/// <returns>
/// <c>true</c> if the <see cref="resolverResult"/> is an instance of this type;
/// <c>true</c> if the <paramref name="context"/> is an instance of this type;
/// otherwise, <c>false</c>.
/// </returns>
bool IsInstanceOfType(IResolverContext context, object resolverResult);
Expand Down
Expand Up @@ -41,8 +41,7 @@ public interface IInterfaceTypeDescriptor<T>
/// Specifies an interface that is implemented by the
/// <see cref="InterfaceType"/>.
/// </summary>
/// <typeparam name="T">The interface type.</typeparam>
/// <typeparam name="TInterface"></typeparam>
/// <typeparam name="TInterface">The interface that is being implemented.</typeparam>
[Obsolete("Use Implements.")]
IInterfaceTypeDescriptor<T> Interface<TInterface>()
where TInterface : InterfaceType;
Expand All @@ -51,8 +50,7 @@ IInterfaceTypeDescriptor<T> Interface<TInterface>()
/// Specifies an interface that is implemented by the
/// <see cref="InterfaceType"/>.
/// </summary>
/// <typeparam name="T">The interface type.</typeparam>
/// <typeparam name="TInterface"></typeparam>
/// <typeparam name="TInterface">The interface that is being implemented.</typeparam>
[Obsolete("Use Implements.")]
IInterfaceTypeDescriptor<T> Interface<TInterface>(TInterface type)
where TInterface : InterfaceType;
Expand All @@ -71,17 +69,15 @@ IInterfaceTypeDescriptor<T> Interface<TInterface>(TInterface type)
/// Specifies an interface that is implemented by the
/// <see cref="InterfaceType"/>.
/// </summary>
/// <typeparam name="T">The interface type.</typeparam>
/// <typeparam name="TInterface"></typeparam>
/// <typeparam name="TInterface">The interface that is being implemented.</typeparam>
IInterfaceTypeDescriptor<T> Implements<TInterface>()
where TInterface : InterfaceType;

/// <summary>
/// Specifies an interface that is implemented by the
/// <see cref="InterfaceType"/>.
/// </summary>
/// <typeparam name="T">The interface type.</typeparam>
/// <typeparam name="TInterface"></typeparam>
/// <typeparam name="TInterface">The interface that is being implemented.</typeparam>
IInterfaceTypeDescriptor<T> Implements<TInterface>(TInterface type)
where TInterface : InterfaceType;

Expand Down
Expand Up @@ -18,7 +18,7 @@ public interface IConventionContext : IHasScope
/// <summary>
/// The schema builder context data that can be used for extensions
/// to pass state along the initialization process.
/// This property can also be reached through <see cref="IDescriptorContext.ContextData" />.
/// This property can also be reached through <see cref="IHasContextData.ContextData" />.
/// </summary>
IDictionary<string, object?> ContextData { get; }

Expand Down
Expand Up @@ -89,6 +89,9 @@ public static class SubscribeResolverObjectFieldDescriptorExtensions
/// <typeparam name="TMessage">
/// The type of the message / event payload.
/// </typeparam>
/// <typeparam name="TTopic">
/// The topic type.
/// </typeparam>
public static IObjectFieldDescriptor SubscribeToTopic<TTopic, TMessage>(
this IObjectFieldDescriptor descriptor,
string argumentName) =>
Expand Down
2 changes: 1 addition & 1 deletion src/HotChocolate/Core/src/Types/Types/InterfaceType.cs
Expand Up @@ -41,7 +41,7 @@ namespace HotChocolate.Types;
/// age: Int
/// }
///
/// type Business implements NamedEntity & ValuedEntity {
/// type Business implements NamedEntity &amp; ValuedEntity {
/// name: String
/// value: Int
/// employeeCount: Int
Expand Down
2 changes: 1 addition & 1 deletion src/HotChocolate/Core/src/Types/Types/ObjectType.cs
Expand Up @@ -113,7 +113,7 @@ public virtual bool IsInstanceOfType(IResolverContext context, object resolverRe
/// The result that shall be checked.
/// </param>
/// <returns>
/// <c>true</c> if the <see cref="resolverResult"/> is an instance of this type;
/// <c>true</c> if the <see cref="context"/> is an instance of this type;
/// otherwise, <c>false</c>.
/// </returns>
[Obsolete("Use IsInstanceOfType")]
Expand Down
Expand Up @@ -29,7 +29,7 @@ public interface IPagingHandler
/// The data set.
/// </param>
/// <returns>
/// Returns the page representing a part from the <see cref="source"/>.
/// Returns the page representing a part from the <paramref name="source"/>.
/// </returns>
ValueTask<IPage> SliceAsync(IResolverContext context, object source);
}
Expand Up @@ -14,7 +14,7 @@ namespace HotChocolate.Types.Pagination;
public interface IPagingProvider
{
/// <summary>
/// Specifies if this paging provider can handle the specified <see cref="source"/>.
/// Specifies if this paging provider can handle the specified <paramref name="source"/>.
/// </summary>
/// <param name="source">
/// The source type represents the result of the field resolver and could be a collection,
Expand Down
26 changes: 7 additions & 19 deletions src/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs
Expand Up @@ -198,21 +198,17 @@ public override bool TryDeserialize(object? resultValue, out object? runtimeValu
}

/// <summary>
/// Creates the exception that will be thrown when <see cref="ParseLiteral"/> encountered an
/// invalid <see cref="IValueNode "/>
/// Creates the exception that will be thrown when <see cref="ParseValue"/>
/// encountered a invalid runtime value.
/// </summary>
/// <param name="valueSyntax">
/// The value syntax that should be parsed
/// <param name="runtimeValue">
/// The runtime value.
/// </param>
/// <returns>
/// The created exception that should be thrown
/// </returns>
protected virtual SerializationException CreateParseValueError(object runtimeValue)
{
return new(
TypeResourceHelper.Scalar_Cannot_ParseResult(Name, runtimeValue.GetType()),
this);
}
=> new(TypeResourceHelper.Scalar_Cannot_ParseResult(Name, runtimeValue.GetType()), this);

/// <summary>
/// Creates the exception that will be thrown when <see cref="ParseLiteral"/> encountered an
Expand All @@ -225,11 +221,7 @@ protected virtual SerializationException CreateParseValueError(object runtimeVal
/// The created exception that should be thrown
/// </returns>
protected virtual SerializationException CreateParseLiteralError(IValueNode valueSyntax)
{
return new(
TypeResourceHelper.Scalar_Cannot_ParseLiteral(Name, valueSyntax.GetType()),
this);
}
=> new(TypeResourceHelper.Scalar_Cannot_ParseLiteral(Name, valueSyntax.GetType()), this);

/// <summary>
/// Creates the exception that will be thrown when <see cref="ParseResult"/> encountered an
Expand All @@ -242,9 +234,5 @@ protected virtual SerializationException CreateParseLiteralError(IValueNode valu
/// The created exception that should be thrown
/// </returns>
protected virtual SerializationException CreateParseResultError(object runtimeValue)
{
return new(
TypeResourceHelper.Scalar_Cannot_ParseResult(Name, runtimeValue.GetType()),
this);
}
=> new(TypeResourceHelper.Scalar_Cannot_ParseResult(Name, runtimeValue.GetType()), this);
}
4 changes: 1 addition & 3 deletions src/HotChocolate/Core/src/Types/Utilities/ChangeType~1.cs
@@ -1,5 +1,3 @@
using System.Diagnostics.CodeAnalysis;

namespace HotChocolate.Utilities;

public delegate TTo ChangeType<TFrom, TTo>([MaybeNull] TFrom source);
public delegate TTo ChangeType<in TFrom, out TTo>(TFrom source);
2 changes: 1 addition & 1 deletion src/HotChocolate/Language/src/Language.Utf8/TokenKind.cs
Expand Up @@ -31,7 +31,7 @@ public enum TokenKind : byte
Dollar,

/// <summary>
/// &
/// &amp;
/// </summary>
Ampersand,

Expand Down
Expand Up @@ -70,18 +70,18 @@ public interface ISyntaxNavigator
bool TryPeek(int count, [NotNullWhen(true)] out ISyntaxNode? node);

/// <summary>
/// Returns the first ancestor of the provided <see cref="TNode" /> type.
/// Returns the first ancestor of the provided <typeparamref name="TNode" /> type.
/// </summary>
/// <typeparam name="TNode">The type of syntax node to be returned.</typeparam>
/// <returns>The matching first ancestor or null if no match is found.</returns>
TNode? GetAncestor<TNode>()
where TNode : ISyntaxNode;

/// <summary>
/// Returns all ancestors of the provided <see cref="TNode" /> type.
/// Returns all ancestors of the provided <typeparamref name="TNode" /> type.
/// </summary>
/// <typeparam name="TNode">The type of syntax nodes to be returned.</typeparam>
/// <returns>A collection of Syntax Nodes of type <see cref="TNode" /></returns>
/// <returns>A collection of Syntax Nodes of type <typeparamref name="TNode" /></returns>
IEnumerable<TNode> GetAncestors<TNode>()
where TNode : ISyntaxNode;

Expand Down
Expand Up @@ -66,10 +66,10 @@ public void CreateArgumentWithoutName()
var value = new StringValueNode("bar");

// act
Action action = () => new ArgumentNode(null, null, value);
void Action() => new ArgumentNode(null, null!, value);

// assert
Assert.Throws<ArgumentNullException>(action);
Assert.Throws<ArgumentNullException>(Action);
}

[Fact]
Expand All @@ -79,7 +79,7 @@ public void CreateArgumentWithoutValue()
var name = new NameNode("foo");

// act
Action action = () => new ArgumentNode(null, name, null);
Action action = () => new ArgumentNode(null, name, null!);

// assert
Assert.Throws<ArgumentNullException>(action);
Expand Down
Expand Up @@ -128,7 +128,7 @@ public void Document_With_Definitions_Null()
var document = new DocumentNode(new IDefinitionNode[] { });

// act
void Action() => document.WithDefinitions(null);
void Action() => document.WithDefinitions(null!);

// assert
Assert.Throws<ArgumentNullException>(Action);
Expand Down
Expand Up @@ -70,7 +70,7 @@ public void EnumTypeDefinitionWithoutName_ArgumentNullException()

// act
EnumTypeDefinitionNode Action()
=> new(location, null, description, directives, values);
=> new(location, null!, description, directives, values);

// assert
Assert.Throws<ArgumentNullException>(Action);
Expand All @@ -88,7 +88,7 @@ public void EnumTypeDefinitionWithoutDirectives_ArgumentNullException()

// act
EnumTypeDefinitionNode Action()
=> new(location, name, description, null, values);
=> new(location, name, description, null!, values);

// assert
Assert.Throws<ArgumentNullException>(Action);
Expand All @@ -109,7 +109,7 @@ public void EnumTypeDefinitionWithoutValues_ArgumentNullException()
name,
description,
directives,
null);
null!);

// assert
Assert.Throws<ArgumentNullException>(a);
Expand Down Expand Up @@ -162,7 +162,7 @@ public void WithDescription()


// assert
Assert.Equal("baz", type.Description.Value);
Assert.Equal("baz", type.Description!.Value);
}

[Fact]
Expand Down
Expand Up @@ -63,7 +63,7 @@ public void EnumTypeExtensionWithoutName_ArgumentNullException()

// act
EnumTypeExtensionNode Action()
=> new(location, null, directives, values);
=> new(location, null!, directives, values);

// assert
Assert.Throws<ArgumentNullException>(Action);
Expand All @@ -80,7 +80,7 @@ public void EnumTypeExtensionWithoutDirectives_ArgumentNullException()

// act
EnumTypeExtensionNode Action()
=> new(location, name, null, values);
=> new(location, name, null!, values);

// assert
Assert.Throws<ArgumentNullException>(Action);
Expand All @@ -99,7 +99,7 @@ public void EnumTypeExtensionWithoutValues_ArgumentNullException()
location,
name,
directives,
null);
null!);

// assert
Assert.Throws<ArgumentNullException>(a);
Expand Down
Expand Up @@ -23,7 +23,7 @@ public void Create_With_Type_Where_Type_Is_Null()
{
// arrange
// act
Action action = () => new NonNullTypeNode(null);
Action action = () => new NonNullTypeNode(null!);

// assert
Assert.Throws<ArgumentNullException>(action);
Expand Down

0 comments on commit cad7eaf

Please sign in to comment.