Skip to content

Commit d557ffd

Browse files
lukebakkenthompson-tomo
authored andcommitted
Revert NetworkOrderDeserializer
1 parent d1d3ca8 commit d557ffd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

projects/RabbitMQ.Client/util/NetworkOrderDeserializer.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal static double ReadDouble(ReadOnlySpan<byte> span)
1515
throw new ArgumentOutOfRangeException(nameof(span), "Insufficient length to decode Double from memory.");
1616
}
1717
ulong val = ReadUInt64(span);
18-
#else
18+
#elif NETSTANDARD
1919
ulong val = BinaryPrimitives.ReadUInt64BigEndian(span);
2020
#endif
2121
return Unsafe.As<ulong, double>(ref val);
@@ -31,7 +31,7 @@ internal static short ReadInt16(ReadOnlySpan<byte> span)
3131
}
3232

3333
return (short)ReadUInt16(span);
34-
#else
34+
#elif NETSTANDARD
3535
return BinaryPrimitives.ReadInt16BigEndian(span);
3636
#endif
3737
}
@@ -46,7 +46,7 @@ internal static int ReadInt32(ReadOnlySpan<byte> span)
4646
}
4747

4848
return (int)ReadUInt32(span);
49-
#else
49+
#elif NETSTANDARD
5050
return BinaryPrimitives.ReadInt32BigEndian(span);
5151
#endif
5252
}
@@ -61,7 +61,7 @@ internal static long ReadInt64(ReadOnlySpan<byte> span)
6161
}
6262

6363
return (long)ReadUInt64(span);
64-
#else
64+
#elif NETSTANDARD
6565
return BinaryPrimitives.ReadInt64BigEndian(span);
6666
#endif
6767
}
@@ -76,7 +76,7 @@ internal static float ReadSingle(ReadOnlySpan<byte> span)
7676
}
7777

7878
uint num = ReadUInt32(span);
79-
#else
79+
#elif NETSTANDARD
8080
uint num = BinaryPrimitives.ReadUInt32BigEndian(span);
8181
#endif
8282
return Unsafe.As<uint, float>(ref num);
@@ -92,7 +92,7 @@ internal static ushort ReadUInt16(ReadOnlySpan<byte> span)
9292
}
9393

9494
return (ushort)((span[0] << 8) | span[1]);
95-
#else
95+
#elif NETSTANDARD
9696
return BinaryPrimitives.ReadUInt16BigEndian(span);
9797
#endif
9898
}
@@ -107,7 +107,7 @@ internal static uint ReadUInt32(ReadOnlySpan<byte> span)
107107
}
108108

109109
return (uint)((span[0] << 24) | (span[1] << 16) | (span[2] << 8) | span[3]);
110-
#else
110+
#elif NETSTANDARD
111111
return BinaryPrimitives.ReadUInt32BigEndian(span);
112112
#endif
113113
}
@@ -124,7 +124,7 @@ internal static ulong ReadUInt64(ReadOnlySpan<byte> span)
124124
uint num1 = (uint)((span[0] << 24) | (span[1] << 16) | (span[2] << 8) | span[3]);
125125
uint num2 = (uint)((span[4] << 24) | (span[5] << 16) | (span[6] << 8) | span[7]);
126126
return ((ulong)num1 << 32) | num2;
127-
#else
127+
#elif NETSTANDARD
128128
return BinaryPrimitives.ReadUInt64BigEndian(span);
129129
#endif
130130
}

0 commit comments

Comments
 (0)