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
2 changes: 1 addition & 1 deletion bench/bench.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
49 changes: 10 additions & 39 deletions src/reader/MsgPackReader.IDeserializeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,61 +13,32 @@ private struct DeserializeType(MsgPackReader<TReader> deserializer) : IDeseriali

char IDeserializeType.ReadChar(int index) => (char)deserializer.ReadU16();

decimal IDeserializeType.ReadDecimal(int index)
{
throw new NotImplementedException();
}
decimal IDeserializeType.ReadDecimal(int index) => deserializer.ReadDecimal();
double IDeserializeType.ReadDouble(int index) => deserializer.ReadDouble();

double IDeserializeType.ReadDouble(int index)
{
throw new NotImplementedException();
}
float IDeserializeType.ReadFloat(int index) => deserializer.ReadFloat();

float IDeserializeType.ReadFloat(int index)
{
throw new NotImplementedException();
}

short IDeserializeType.ReadI16(int index)
{
throw new NotImplementedException();
}
short IDeserializeType.ReadI16(int index) => deserializer.ReadI16();

int IDeserializeType.ReadI32(int index) => deserializer.ReadI32();

long IDeserializeType.ReadI64(int index) => deserializer.ReadI64();

sbyte IDeserializeType.ReadSByte(int index)
{
throw new NotImplementedException();
}
sbyte IDeserializeType.ReadSByte(int index) => deserializer.ReadSByte();

string IDeserializeType.ReadString(int index) => deserializer.ReadString();

ushort IDeserializeType.ReadU16(int index)
{
throw new NotImplementedException();
}
ushort IDeserializeType.ReadU16(int index) => deserializer.ReadU16();

uint IDeserializeType.ReadU32(int index)
{
throw new NotImplementedException();
}
uint IDeserializeType.ReadU32(int index) => deserializer.ReadU32();

ulong IDeserializeType.ReadU64(int index)
{
throw new NotImplementedException();
}
ulong IDeserializeType.ReadU64(int index) => deserializer.ReadU64();

T IDeserializeType.ReadValue<T>(int index, Serde.IDeserialize<T> deserialize)
{
throw new NotImplementedException();
}
=> deserialize.Deserialize(deserializer);

void IDeserializeType.SkipValue()
{
throw new NotImplementedException();
}
=> throw new NotImplementedException();

int IDeserializeType.TryReadIndex(ISerdeInfo map, out string? errorName)
{
Expand Down
10 changes: 5 additions & 5 deletions src/reader/MsgPackReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ IDeserializeCollection IDeserializer.ReadCollection(ISerdeInfo typeInfo)
}
}

decimal IDeserializer.ReadDecimal()
public decimal ReadDecimal()
{
throw new NotImplementedException();
}
Expand Down Expand Up @@ -250,7 +250,7 @@ private bool TryReadI16(out short i16)
return false;
}

short IDeserializer.ReadI16()
public short ReadI16()
{
if (!TryReadI16(out var i16))
{
Expand Down Expand Up @@ -335,7 +335,7 @@ private long ReadI64()
return proxy.Deserialize(this);
}

sbyte IDeserializer.ReadSByte()
public sbyte ReadSByte()
{
if (!TryReadSbyte(out var sb))
{
Expand Down Expand Up @@ -490,7 +490,7 @@ private bool TryReadU64(out ulong u64)
return false;
}

uint IDeserializer.ReadU32()
public uint ReadU32()
{
if (!TryReadU32(out var u32))
{
Expand All @@ -499,7 +499,7 @@ uint IDeserializer.ReadU32()
return u32;
}

ulong IDeserializer.ReadU64()
public ulong ReadU64()
{
if (!TryReadU64(out var u64))
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Serde.MsgPack.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Loading