CSLE.CLS_Expression_MemberSetValue.ComputeValue C# (CSharp) Method

ComputeValue() public method

public ComputeValue ( CLS_Content content ) : CLS_Content.Value
content CLS_Content
return CLS_Content.Value
        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            var parent = listParam[0].ComputeValue(content);
            if (parent == null)
            {
                throw new Exception("调用空对象的方法:" + listParam[0].ToString() + ":" + ToString());
            }
            var value = listParam[1].ComputeValue(content);
            object setv=value.value;
            //if(value.type!=parent.type)
            //{
            //    var vtype = content.environment.GetType(value.type);
            //    setv = vtype.ConvertTo(content.environment, setv, parent.type);
            //}
            var typefunction = content.environment.GetType(parent.type).function;
            if(parent.type is object)
            {
                SInstance s = parent.value as SInstance;
                if(s!=null)
                {
                    typefunction = s.type;
                }
            }
            typefunction.MemberValueSet(content, parent.value, membername, setv);
            //做数学计算
            //从上下文取值
            //_value = null;
            content.OutStack(this);
            return null;
        }