Exemplo n.º 1
0
        public void EmitGet( )
        {
            MethodInfo getMethod = Property.GetGetMethod();

            SubjectExp.Emit();
            ArgExp.RequireType = ZTypeManager.GetBySharpType(getMethod.ReturnType) as ZType;
            ArgExp.Emit();
            EmitHelper.CallDynamic(IL, getMethod);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public override void SetParent(Exp parentExp)
 {
     ParentExp = parentExp;
     SubjectExp.SetParent(this);
     ArgExp.SetParent(this);
 }
Exemplo n.º 4
0
 public override string ToString()
 {
     return(string.Format("{0}第{1}", SubjectExp.ToString(), ArgExp.ToString()));
 }