Skip to content

Commit

Permalink
Merge pull request #8619 from IEvangelist/patterns
Browse files Browse the repository at this point in the history
Address IDE0038. Use pattern matching.
  • Loading branch information
adityamandaleeka authored Feb 16, 2024
2 parents 639709e + ffb3a99 commit 374ab20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Orleans.Serialization/Buffers/Writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ internal Writer(TBufferWriter output, Span<byte> span, SerializerSession session
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Dispose()
{
// Avoid boxing the struct, for better perf and codegen.
if (typeof(TBufferWriter).IsValueType)
{
if (Output is IDisposable)
Expand Down Expand Up @@ -548,4 +549,4 @@ private void WriteVarUInt64Slow(ulong value)
BinaryPrimitives.WriteUInt16LittleEndian(_currentSpan[sizeof(ulong)..], (ushort)upper);
}
}
}
}

0 comments on commit 374ab20

Please sign in to comment.