using JD.Remoting; using JD.Serialization; namespace JD.Inspector.Plugin { public partial class InspectorPlugin { private readonly object _lockObject = new object(); public void SendPropertiesData(object properties) { if (!DataAreValid()) { return; } string xml = string.Empty; VerboseXmlSerializer serializer = new VerboseXmlSerializer(); this.Send(Messages.MessageProperties, blob => { blob.Push(true); lock (_listPropertiesData) { foreach (PropertiesData propertiesData in _listPropertiesData) { xml = serializer.FillXmlStringFromObject(properties); blob.Push(propertiesData.Owner); blob.Push(propertiesData.Data); blob.Push(xml); } } blob.Push(PropertiesData.ItfInvalidObjref); }); } public void SendSaveScene() { this.Send(Messages.MessageSaveScene); } private void ReceiveClear(IBlob blob) { lock (_lockObject) { DataInvalidate(); } } private void ReceiveGetSessionInfo(IBlob blob) { string dataRoot = blob.ExtractString(); lock (_lockObject) { DataRootPath = dataRoot; } } private void ReceiveProperties(IBlob blob) { lock (_lockObject) { DataInvalidate(); while (true) { uint owner = blob.ExtractUInt(); if (owner == PropertiesData.ItfInvalidObjref) { break; } PropertiesData pd = new PropertiesData { Owner = owner, Data = blob.ExtractUInt(), Name = blob.ExtractString(), Xml = blob.ExtractString() }; DataAdd(pd); } } } } }