public override void OnMemberReferenceExpression(MemberReferenceExpression node) { if (IsStaticReferenceThroughInstance(node)) { var declaringType = node.Target.ExpressionType; var needsQualification = node.NeedsQualificationFor(declaringType.ParentNamespace); node.Replace(node.Target, new ReferenceExpression(needsQualification ? declaringType.FullName : declaringType.Name)); } base.OnMemberReferenceExpression(node); }