Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Base Exception Type:
- System.TimeoutException: 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
- at ProtoBuf.Meta.RuntimeTypeModel.TakeLock(Boolean& lockTaken)
- at ProtoBuf.Meta.RuntimeTypeModel.FindOrAddAuto(Type type, Boolean demand, Boolean addWithContractOnly, Boolean addEvenIfAutoDisabled)
- at ProtoBuf.Meta.RuntimeTypeModel.GetKey(Type type, Boolean demand, Boolean getBaseKey)
- Inner Exception Type:
- System.TimeoutException: 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
- at ProtoBuf.Meta.RuntimeTypeModel.TakeLock(Boolean& lockTaken)
- at ProtoBuf.Meta.RuntimeTypeModel.FindOrAddAuto(Type type, Boolean demand, Boolean addWithContractOnly, Boolean addEvenIfAutoDisabled)
- at ProtoBuf.Meta.RuntimeTypeModel.GetKey(Type type, Boolean demand, Boolean getBaseKey)
- Stack Trace:
- at ProtoBuf.Meta.RuntimeTypeModel.GetKey(Type type, Boolean demand, Boolean getBaseKey)
- at ProtoBuf.Meta.TypeModel.GetKey(Type& type)
- at ProtoBuf.Meta.TypeModel.Deserialize(Stream source, Object value, Type type)
- [ProtoContract]
- public class Job
- {
- [ProtoMember(1)]
- public long JobId { get; private set; }
- }
- var type = this.GetType();
- RuntimeTypeModel.Default.Add(type, true);
- Int32 i = 1;
- foreach(PropertyInfo info in type.GetProperties())
- {
- if(info.CanWrite)
- {
- RuntimeTypeModel.Default[type].AddField(i++, info.Name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement