public IPhpValue MakeSetValueExpression(IPhpValue v) { if (translationInfo == null) { throw new ArgumentNullException("translationInfo"); } if (translationInfo.IsStatic) { throw new NotSupportedException(); } if (translationInfo.GetSetByMethod) { var a = new PhpMethodCallExpression(translationInfo.SetMethodName); a.Arguments.Add(new PhpMethodInvokeValue(v)); a.TargetObject = targetObject; return(a); } else { var a = new PhpInstanceFieldAccessExpression(translationInfo.FieldScriptName, targetObject, null); var b = new PhpAssignExpression(a, v); return(b); } }
public IPhpValue MakeGetValueExpression() { if (translationInfo == null) throw new ArgumentNullException("translationInfo"); if (translationInfo.IsStatic) throw new NotSupportedException(); if (translationInfo.GetSetByMethod) { var a = new PhpMethodCallExpression(translationInfo.GetMethodName); a.TargetObject = targetObject; return a; } else { var a = new PhpInstanceFieldAccessExpression(translationInfo.FieldScriptName, targetObject, null); return a; } }
public IPhpValue MakeGetValueExpression() { if (TranslationInfo == null) { throw new ArgumentNullException("translationInfo"); } if (TranslationInfo.IsStatic) { throw new NotSupportedException(); } if (TranslationInfo.GetSetByMethod) { var a = new PhpMethodCallExpression(TranslationInfo.GetMethodName); a.TargetObject = TargetObject; return(a); } else { var a = new PhpInstanceFieldAccessExpression(TranslationInfo.FieldScriptName, TargetObject, null); return(a); } }