Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. Base Exception Type:
  2. 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
  3. at ProtoBuf.Meta.RuntimeTypeModel.TakeLock(Boolean& lockTaken)
  4. at ProtoBuf.Meta.RuntimeTypeModel.FindOrAddAuto(Type type, Boolean demand, Boolean addWithContractOnly, Boolean addEvenIfAutoDisabled)
  5. at ProtoBuf.Meta.RuntimeTypeModel.GetKey(Type type, Boolean demand, Boolean getBaseKey)
  6.  
  7. Inner Exception Type:
  8. 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
  9. at ProtoBuf.Meta.RuntimeTypeModel.TakeLock(Boolean& lockTaken)
  10. at ProtoBuf.Meta.RuntimeTypeModel.FindOrAddAuto(Type type, Boolean demand, Boolean addWithContractOnly, Boolean addEvenIfAutoDisabled)
  11. at ProtoBuf.Meta.RuntimeTypeModel.GetKey(Type type, Boolean demand, Boolean getBaseKey)
  12.  
  13. Stack Trace:
  14. at ProtoBuf.Meta.RuntimeTypeModel.GetKey(Type type, Boolean demand, Boolean getBaseKey)
  15. at ProtoBuf.Meta.TypeModel.GetKey(Type& type)
  16. at ProtoBuf.Meta.TypeModel.Deserialize(Stream source, Object value, Type type)
  17.  
  18. [ProtoContract]
  19. public class Job
  20. {
  21. [ProtoMember(1)]
  22. public long JobId { get; private set; }
  23. }
  24.  
  25. var type = this.GetType();
  26. RuntimeTypeModel.Default.Add(type, true);
  27. Int32 i = 1;
  28. foreach(PropertyInfo info in type.GetProperties())
  29. {
  30. if(info.CanWrite)
  31. {
  32. RuntimeTypeModel.Default[type].AddField(i++, info.Name);
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement