public void MemberValueSet(CLS_Content content, object object_this, string valuename, object value, bool isBaseCall = false) { SInstance sin = object_this as SInstance; CLS_Content.Value mV; if (sin.member.TryGetValue(valuename, out mV)) { mV.value = value; mV.FixValueType(content); return; } // 判断是否有同名的Set属性 Member property; if (sin.type.propertys.TryGetValue(valuename, out property)) { if (property.setFun != null) { BetterList <CLS_Content.Value> _params = CLS_Content.NewParamList(); CLS_Content.Value hideValue = new CLS_Content.Value() { type = property.type.type, value = value }; hideValue.FixValueType(content); _params.Add(hideValue); this.MemberCall(content, object_this, property.setFun, _params, isBaseCall); CLS_Content.PoolParamList(_params); return; } throw new NotImplementedException("属性无set权限: " + this.Name + "." + valuename); } throw new NotImplementedException("未实现成员赋值字段: " + this.Name + "." + valuename); }
public bool TryMemberValueSet(CLS_Content content, SInstance sin, string valuename, object value) { CLS_Content.Value mV; if (sin.member.TryGetValue(valuename, out mV)) { mV.value = value; mV.FixValueType(content); return(true); } // 判断是否有同名的Set属性 Member property; if (sin.type.propertys.TryGetValue(valuename, out property)) { if (property.setFun != null) { BetterList <CLS_Content.Value> _params = CLS_Content.NewParamList(); CLS_Content.Value hideValue = new CLS_Content.Value() { type = property.type.type, value = value }; hideValue.FixValueType(content); _params.Add(hideValue); if (property.bStatic) { this.StaticCall(content, property.setFun, _params); } else { this.MemberCall(content, sin, property.setFun, _params); } CLS_Content.PoolParamList(_params); return(true); } throw new NotImplementedException("属性无set权限: " + this.Name + "." + valuename); } return(false); }
public bool TryStaticValueSet(CLS_Content content, string valuename, object value) { if (staticMemberContent == null) { NewStatic(content.environment); } CLS_Content.Value sV; if (this.staticMemberValues.TryGetValue(valuename, out sV)) { sV.value = value; sV.FixValueType(content); return(true); } // 判断是否有同名的Set属性 Member property; if (this.propertys.TryGetValue(valuename, out property)) { if (property.setFun != null) { BetterList <CLS_Content.Value> _params = CLS_Content.NewParamList(); CLS_Content.Value hideValue = new CLS_Content.Value() { type = property.type.type, value = value }; hideValue.FixValueType(content); _params.Add(hideValue); this.StaticCall(content, property.setFun, _params); CLS_Content.PoolParamList(_params); return(true); } throw new NotImplementedException("属性无set权限: " + this.Name + "." + valuename); } return(false); }
public bool TryStaticValueSet(CLS_Content content, string valuename, object value) { if (staticMemberContent == null) NewStatic(content.environment); CLS_Content.Value sV; if (this.staticMemberValues.TryGetValue(valuename, out sV)) { sV.value = value; sV.FixValueType(content); return true; } // 判断是否有同名的Set属性 Member property; if (this.propertys.TryGetValue(valuename, out property)) { if (property.setFun != null) { BetterList<CLS_Content.Value> _params = CLS_Content.NewParamList(); CLS_Content.Value hideValue = new CLS_Content.Value() { type = property.type.type, value = value }; hideValue.FixValueType(content); _params.Add(hideValue); this.StaticCall(content, property.setFun, _params); CLS_Content.PoolParamList(_params); return true; } throw new NotImplementedException("属性无set权限: " + this.Name + "." + valuename); } return false; }
public bool TryMemberValueSet(CLS_Content content, SInstance sin, string valuename, object value) { CLS_Content.Value mV; if (sin.member.TryGetValue(valuename, out mV)) { mV.value = value; mV.FixValueType(content); return true; } // 判断是否有同名的Set属性 Member property; if (sin.type.propertys.TryGetValue(valuename, out property)) { if (property.setFun != null) { BetterList<CLS_Content.Value> _params = CLS_Content.NewParamList(); CLS_Content.Value hideValue = new CLS_Content.Value() { type = property.type.type, value = value }; hideValue.FixValueType(content); _params.Add(hideValue); if (property.bStatic) this.StaticCall(content, property.setFun, _params); else this.MemberCall(content, sin, property.setFun, _params); CLS_Content.PoolParamList(_params); return true; } throw new NotImplementedException("属性无set权限: " + this.Name + "." + valuename); } return false; }
public void MemberValueSet(CLS_Content content, object object_this, string valuename, object value, bool isBaseCall = false) { SInstance sin = object_this as SInstance; CLS_Content.Value mV; if (sin.member.TryGetValue(valuename, out mV)) { mV.value = value; mV.FixValueType(content); return; } // 判断是否有同名的Set属性 Member property; if (sin.type.propertys.TryGetValue(valuename, out property)) { if (property.setFun != null) { BetterList<CLS_Content.Value> _params = CLS_Content.NewParamList(); CLS_Content.Value hideValue = new CLS_Content.Value() { type = property.type.type, value = value }; hideValue.FixValueType(content); _params.Add(hideValue); this.MemberCall(content, object_this, property.setFun, _params, isBaseCall); CLS_Content.PoolParamList(_params); return; } throw new NotImplementedException("属性无set权限: " + this.Name + "." + valuename); } throw new NotImplementedException("未实现成员赋值字段: " + this.Name + "." + valuename); }