Skip to content

Commit

Permalink
Reformatted Core Code (#4439)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib authored Nov 16, 2021
1 parent 38d8775 commit c479c10
Show file tree
Hide file tree
Showing 288 changed files with 16,303 additions and 16,585 deletions.
39 changes: 19 additions & 20 deletions src/HotChocolate/Core/src/Abstractions/AggregateError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@
using System.Linq;
using HotChocolate.Properties;

namespace HotChocolate
namespace HotChocolate;

/// <summary>
/// An aggregate error allows to pass a collection of error in a single error object.
/// </summary>
public class AggregateError : Error
{
/// <summary>
/// An aggregate error allows to pass a collection of error in a single error object.
/// </summary>
public class AggregateError : Error
public AggregateError(IEnumerable<IError> errors)
: base(AbstractionResources.AggregateError_Message)
{
public AggregateError(IEnumerable<IError> errors)
: base(AbstractionResources.AggregateError_Message)
{
Errors = errors.ToArray();
}

public AggregateError(params IError[] errors)
: base(AbstractionResources.AggregateError_Message)
{
Errors = errors.ToArray();
}
Errors = errors.ToArray();
}

/// <summary>
/// Gets the actual errors.
/// </summary>
public IReadOnlyList<IError> Errors { get; }
public AggregateError(params IError[] errors)
: base(AbstractionResources.AggregateError_Message)
{
Errors = errors.ToArray();
}

/// <summary>
/// Gets the actual errors.
/// </summary>
public IReadOnlyList<IError> Errors { get; }
}
35 changes: 17 additions & 18 deletions src/HotChocolate/Core/src/Abstractions/ArgumentAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@

#nullable enable

namespace HotChocolate
namespace HotChocolate;

/// <summary>
/// Specifies resolver parameter represents a GraphQL field argument.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class ArgumentAttribute : Attribute
{
/// <summary>
/// Specifies resolver parameter represents a GraphQL field argument.
/// </summary>
[AttributeUsage(AttributeTargets.Parameter)]
public sealed class ArgumentAttribute : Attribute
/// <param name="name">
/// The name override for the GraphQL field argument.
/// </param>
public ArgumentAttribute(string? name = null)
{
/// <summary>
/// Specifies resolver parameter represents a GraphQL field argument.
/// </summary>
/// <param name="name">
/// The name override for the GraphQL field argument.
/// </param>
public ArgumentAttribute(string? name = null)
{
Name = name;
}

/// <summary>
/// Gets the name override for the GraphQL field argument.
/// </summary>
public string? Name { get; }
Name = name;
}

/// <summary>
/// Gets the name override for the GraphQL field argument.
/// </summary>
public string? Name { get; }
}
Loading

0 comments on commit c479c10

Please sign in to comment.