public static ITranslation GetSubjectTranslation( this MethodCallExpression methodCall, ITranslationContext context) { return(context.GetTranslationFor(methodCall.GetSubject()) ?? context.GetTranslationFor(methodCall.Method.DeclaringType)); }
private static IEnumerable <MethodCallExpression> GetChainedMethodCalls(MethodCallExpression methodCall) { while (methodCall != null) { yield return(methodCall); methodCall = methodCall.GetSubject() as MethodCallExpression; } }