/// <summary> /// 客户端的属性值传递到服务器端,不会去改变服务器端的属性定义 /// </summary> /// <param name="cpv"></param> /// <param name="pv"></param> public void ClientToServer(ClientPropertyValue cpv, PropertyValue pv) { cpv.NullCheck("cpv"); if (pv != null) { pv.StringValue = cpv.StringValue; } }
public void ServerToClient(PropertyValue pv, ClientPropertyValue cpv) { pv.NullCheck("pv"); cpv.NullCheck("cpv"); cpv.DataType = pv.Definition.DataType.ToClientPropertyDataType(); cpv.Key = pv.Definition.Name; if (pv.StringValue.IsNullOrEmpty()) { cpv.StringValue = pv.Definition.DefaultValue; } else { cpv.StringValue = pv.StringValue; } }