0
を検査しながら、私は2.0.0.668Protobuf.netポータブル例外 - タイムアウトメタデータ
私のユニットテストこのエラーを投げ続けるポータブルいるProtobuf-net.dllバージョンを使用しています:
ProtoBuf.ProtoException : Timeout while inspecting metadata; this may indicate a deadlock. This can often be avoided by preparing necessary serializers during application initialization, rather than allowing multiple threads to perform the initial metadata inspection; please also see the LockContended event
私が試しました成功しなかった以下のもの:
Serializer.PrepareSerializer<ParametersSetRequestMessage>();
テストにスレッドがありません。そして、直列化される型は複雑ではありません。
[ProtoContract]
public class ParametersSetRequestMessage: Message, IParameterMessage
{
public ParametersSetRequestMessage()
{
Type = MessageType.ParametersSetRequest;
BaseType = BaseMessageType.Command;
}
public MessageType Type { get; protected set; }
[ProtoMember(1)]
public List<ParameterSlim> SetParameters { get; set; }
}
[ProtoContract]
public class ParameterSlim
{
[ProtoMember(1)]
public ParameterId ParameterId { get; set; }
[ProtoMember(2)]
public byte[] RawBytes { get; set; }
}
[ProtoContract]
public class Message : IMessage
{
public BaseMessageType BaseType { get; protected set; }
[ProtoMember(1)]
public DateTime ReceivedTime { get; set; }
}