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

                methodCall = methodCall.GetSubject() as MethodCallExpression;
            }
        }