Commit 3b0ebc03 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 SyncProp 模块,客户端没有限制 property 推送, 导致服务器 收到 IsConnected 设置请求。出错了。。。

parent 735de845
...@@ -81,13 +81,27 @@ namespace FLY.OBJComponents.Client ...@@ -81,13 +81,27 @@ namespace FLY.OBJComponents.Client
if (sender is IPropertyOpt) if (sender is IPropertyOpt)
{ {
var opt = (IPropertyOpt)sender; var opt = (IPropertyOpt)sender;
string[] nosync = opt.GetNoSyncPropNames(); string[] sync = opt.GetSyncPropNames();
if (nosync != null && nosync.Count()!=0) { if (sync != null && sync.Count() != 0)
if (nosync.Contains(e.PropertyName)) { {
//这个不需要同步 if (!sync.Contains(e.PropertyName))
{
//没有包含,不需要同步
return; return;
} }
} }
else
{
string[] nosync = opt.GetNoSyncPropNames();
if (nosync != null && nosync.Count() != 0)
{
if (nosync.Contains(e.PropertyName))
{
//这个不需要同步
return;
}
}
}
} }
string objname = (from kv in ObjNames where kv.Value == sender select kv.Key).First(); string objname = (from kv in ObjNames where kv.Value == sender select kv.Key).First();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment