示例#1
0
文件: ExpDi.cs 项目: pyzh/ZLanguage3
        public void EmitGet( )
        {
            MethodInfo getMethod = Property.GetGetMethod();

            SubjectExp.Emit();
            ArgExp.RequireType = ZTypeManager.GetBySharpType(getMethod.ReturnType) as ZType;
            ArgExp.Emit();
            EmitHelper.CallDynamic(IL, getMethod);
        }
示例#2
0
文件: ExpDi.cs 项目: pyzh/ZLanguage3
        public void EmitSet(Exp valueExp)
        {
            MethodInfo setMethod = Property.GetSetMethod();

            SubjectExp.Emit();
            ArgExp.RequireType = ZTypeManager.GetBySharpType(setMethod.GetParameters()[0].ParameterType) as ZType;
            ArgExp.Emit();
            //EmitHelper.Box(il, ArgExp.RetType, setMethod.GetParameters()[0].ParameterType);
            valueExp.RequireType = ZTypeManager.GetBySharpType(setMethod.GetParameters()[1].ParameterType) as ZType;
            valueExp.Emit();
            EmitHelper.CallDynamic(IL, setMethod);
        }
示例#3
0
文件: ExpDi.cs 项目: pyzh/ZLanguage3
 public override void SetParent(Exp parentExp)
 {
     ParentExp = parentExp;
     SubjectExp.SetParent(this);
     ArgExp.SetParent(this);
 }
示例#4
0
文件: ExpDi.cs 项目: pyzh/ZLanguage3
 public override string ToString()
 {
     return(string.Format("{0}第{1}", SubjectExp.ToString(), ArgExp.ToString()));
 }