Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
700 B
8
Indexable
Never
public static class GenericTestSerializer
{
    public static void WriteGenericClassTestString(this Writer writer, GenericClassTest<string> value)
    {
        writer.Write<string>(value.obj);
    }

    public static GenericClassTest<string> ReadGenericClassTestString(this Reader reader)
    {
        return new GenericClassTest<string>(reader.Read<string>());
    }

    public static void WriteGenericClassTestInt(this Writer writer, GenericClassTest<int> value)
    {
        writer.Write<int>(value.obj);
    }

    public static GenericClassTest<int> ReadGenericClassTestInt(this Reader reader)
    {
        return new GenericClassTest<int>(reader.Read<int>());
    }
}