mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Switched protobuf serialization to use precompiled assembly
This commit is contained in:
parent
e6d689bdd3
commit
5525d108d3
1 changed files with 1 additions and 4 deletions
|
@ -19,20 +19,17 @@ namespace MediaBrowser.Common.Serialization
|
|||
|
||||
public static void SerializeToStream<T>(T obj, Stream stream)
|
||||
{
|
||||
//new ProtobufModelSerializer.Serialize(stream, typeof(T));
|
||||
ProtoBuf.Serializer.Serialize(stream, obj);
|
||||
ProtobufModelSerializer.Serialize(stream, obj);
|
||||
}
|
||||
|
||||
public static T DeserializeFromStream<T>(Stream stream)
|
||||
where T : class
|
||||
{
|
||||
//return ProtoBuf.Serializer.Deserialize<T>(stream);
|
||||
return ProtobufModelSerializer.Deserialize(stream, null, typeof(T)) as T;
|
||||
}
|
||||
|
||||
public static object DeserializeFromStream(Stream stream, Type type)
|
||||
{
|
||||
//throw new NotImplementedException();
|
||||
return ProtobufModelSerializer.Deserialize(stream, null, type);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue