Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types.Scalars.Upload/UploadType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider
/// <param name="runtimeValue">The runtime value (not used).</param>
/// <param name="resultValue">The result element (not used).</param>
/// <exception cref="NotSupportedException">Always thrown as output coercion is not supported.</exception>
public override void OnCoerceOutputValue(IFile runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(IFile runtimeValue, ResultElement resultValue)
=> throw new NotSupportedException();

/// <summary>
Expand All @@ -91,7 +91,7 @@ public override void OnCoerceOutputValue(IFile runtimeValue, ResultElement resul
/// <param name="runtimeValue">The runtime value (not used).</param>
/// <returns>Never returns; always throws.</returns>
/// <exception cref="NotSupportedException">Always thrown as value to literal conversion is not supported.</exception>
public override IValueNode OnValueToLiteral(IFile runtimeValue)
protected override IValueNode OnValueToLiteral(IFile runtimeValue)
=> throw new NotSupportedException();

/// <inheritdoc />
Expand Down
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/AnyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider
=> inputValue.Clone();

/// <inheritdoc />
public override void OnCoerceOutputValue(JsonElement runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(JsonElement runtimeValue, ResultElement resultValue)
{
switch (runtimeValue.ValueKind)
{
Expand Down Expand Up @@ -145,7 +145,7 @@ public override void OnCoerceOutputValue(JsonElement runtimeValue, ResultElement
}

/// <inheritdoc />
public override IValueNode OnValueToLiteral(JsonElement runtimeValue)
protected override IValueNode OnValueToLiteral(JsonElement runtimeValue)
=> JsonParser.Parse(runtimeValue);

private static class JsonParser
Expand Down
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/ByteType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ protected override sbyte OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetSByte();

/// <inheritdoc />
public override void OnCoerceOutputValue(sbyte runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(sbyte runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(sbyte runtimeValue)
protected override IValueNode OnValueToLiteral(sbyte runtimeValue)
=> new IntValueNode(runtimeValue);
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/DecimalType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ protected override decimal OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetDecimal();

/// <inheritdoc />
public override void OnCoerceOutputValue(decimal runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(decimal runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(decimal runtimeValue)
protected override IValueNode OnValueToLiteral(decimal runtimeValue)
=> new FloatValueNode(runtimeValue);
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/FloatType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ protected override double OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetDouble();

/// <inheritdoc />
public override void OnCoerceOutputValue(double runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(double runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(double runtimeValue)
protected override IValueNode OnValueToLiteral(double runtimeValue)
=> new FloatValueNode(runtimeValue);
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/IdType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider
}

/// <inheritdoc />
public override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
=> resultValue.SetStringValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(string runtimeValue)
protected override IValueNode OnValueToLiteral(string runtimeValue)
=> new StringValueNode(runtimeValue);
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/IntType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ protected override int OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetInt32();

/// <inheritdoc />
public override void OnCoerceOutputValue(int runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(int runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(int runtimeValue)
protected override IValueNode OnValueToLiteral(int runtimeValue)
=> new IntValueNode(runtimeValue);
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/LongType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ protected override long OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetInt64();

/// <inheritdoc />
public override void OnCoerceOutputValue(long runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(long runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(long runtimeValue)
protected override IValueNode OnValueToLiteral(long runtimeValue)
=> new IntValueNode(runtimeValue);
}
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/ScalarType~1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override void CoerceOutputValue(object runtimeValue, ResultElement result
/// <exception cref="LeafCoercionException">
/// Unable to coerce the given <paramref name="runtimeValue"/> into an output value.
/// </exception>
public abstract void OnCoerceOutputValue(TRuntimeType runtimeValue, ResultElement resultValue);
protected abstract void OnCoerceOutputValue(TRuntimeType runtimeValue, ResultElement resultValue);

/// <inheritdoc />
public override IValueNode ValueToLiteral(object runtimeValue)
Expand All @@ -74,7 +74,7 @@ public override IValueNode ValueToLiteral(object runtimeValue)
/// <exception cref="LeafCoercionException">
/// Unable to convert the given <paramref name="runtimeValue"/> into a literal.
/// </exception>
public abstract IValueNode OnValueToLiteral(TRuntimeType runtimeValue);
protected abstract IValueNode OnValueToLiteral(TRuntimeType runtimeValue);

/// <summary>
/// Creates the exception to throw when <see cref="CoerceOutputValue(object, ResultElement)"/>
Expand Down
4 changes: 2 additions & 2 deletions src/HotChocolate/Core/src/Types/Types/Scalars/ShortType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ protected override short OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetInt16();

/// <inheritdoc />
public override void OnCoerceOutputValue(short runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(short runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(short runtimeValue)
protected override IValueNode OnValueToLiteral(short runtimeValue)
=> new IntValueNode(runtimeValue);
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ protected override byte OnCoerceInputLiteral(IntValueNode valueLiteral)
protected override byte OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetByte();

public override void OnCoerceOutputValue(byte runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(byte runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

public override IValueNode OnValueToLiteral(byte runtimeValue)
protected override IValueNode OnValueToLiteral(byte runtimeValue)
=> new IntValueNode(runtimeValue);
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ protected override uint OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetUInt32();

/// <inheritdoc />
public override void OnCoerceOutputValue(uint runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(uint runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(uint runtimeValue)
protected override IValueNode OnValueToLiteral(uint runtimeValue)
=> new IntValueNode(runtimeValue);
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ protected override ulong OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetUInt64();

/// <inheritdoc />
public override void OnCoerceOutputValue(ulong runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(ulong runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(ulong runtimeValue)
protected override IValueNode OnValueToLiteral(ulong runtimeValue)
=> new IntValueNode(runtimeValue);
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ protected override ushort OnCoerceInputValue(JsonElement inputValue)
=> inputValue.GetUInt16();

/// <inheritdoc />
public override void OnCoerceOutputValue(ushort runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(ushort runtimeValue, ResultElement resultValue)
=> resultValue.SetNumberValue(runtimeValue);

/// <inheritdoc />
public override IValueNode OnValueToLiteral(ushort runtimeValue)
protected override IValueNode OnValueToLiteral(ushort runtimeValue)
=> new IntValueNode(runtimeValue);
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public override object CoerceInputLiteral(IValueNode valueLiteral)
public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider context)
=> throw new NotImplementedException();

public override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
=> throw new NotImplementedException();

public override IValueNode OnValueToLiteral(string runtimeValue)
protected override IValueNode OnValueToLiteral(string runtimeValue)
=> throw new NotImplementedException();
}

Expand Down Expand Up @@ -105,10 +105,10 @@ public override object CoerceInputLiteral(IValueNode valueLiteral)
public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider context)
=> throw new NotImplementedException();

public override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
=> throw new NotImplementedException();

public override IValueNode OnValueToLiteral(string runtimeValue)
protected override IValueNode OnValueToLiteral(string runtimeValue)
=> throw new NotImplementedException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider
throw new NotImplementedException();
}

public override void OnCoerceOutputValue(int runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(int runtimeValue, ResultElement resultValue)
{
throw new NotImplementedException();
}

public override IValueNode OnValueToLiteral(int runtimeValue)
protected override IValueNode OnValueToLiteral(int runtimeValue)
{
throw new NotImplementedException();
}
Expand All @@ -102,12 +102,12 @@ public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider
throw new NotImplementedException();
}

public override void OnCoerceOutputValue(int runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(int runtimeValue, ResultElement resultValue)
{
throw new NotImplementedException();
}

public override IValueNode OnValueToLiteral(int runtimeValue)
protected override IValueNode OnValueToLiteral(int runtimeValue)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public override object CoerceInputLiteral(IValueNode valueLiteral)
public override object CoerceInputValue(JsonElement inputValue, IFeatureProvider context)
=> throw new InvalidOperationException();

public override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
protected override void OnCoerceOutputValue(string runtimeValue, ResultElement resultValue)
=> throw new InvalidOperationException();

public override IValueNode OnValueToLiteral(string runtimeValue)
protected override IValueNode OnValueToLiteral(string runtimeValue)
=> throw new InvalidOperationException();
}
Loading