public override MethodInvocation ProcessUsage(IReference reference)
        {
            var referenceExpression = reference.GetTreeNode() as IReferenceExpression;

            if (referenceExpression == null)
            {
                Driver.AddConflict(ReferenceConflict.CreateError(reference, "{0} can not be updated correctly.", "Usage"));
                return(null);
            }

            bool isExtensionMethod           = referenceExpression.IsExtensionMethod();
            IInvocationExpression invocation = InvocationExpressionNavigator.GetByInvokedExpression(referenceExpression);

            if (invocation == null)
            {
                Driver.AddConflict(ReferenceConflict.CreateError(reference, "{0} can not be updated correctly.", "Usage"));
                return(null);
            }

            ITreeNode element = GetArgument(invocation, isExtensionMethod);

            var   argument = element as ICSharpArgument;
            IType type     = argument != null?GetTypeOfValue(argument.Value) : GetTypeOfValue(element);

            if (type == null || !type.CanUseExplicitly(invocation))
            {
                Driver.AddConflict(ReferenceConflict.CreateError(
                                       reference, "Argument of {0} is not valid 'typeof' expression.", "usage"));
                return(null);
            }

            // we can rely on resolve result since method declaration is not yet changed.
            ResolveResultWithInfo resolveResult = reference.Resolve();
            ISubstitution         substitution  = resolveResult.Result.Substitution;
            var method = resolveResult.DeclaredElement as IMethod;

            if (method == null)
            {
                return(null);
            }

            if (argument != null)
            {
                invocation.RemoveArgument(argument);
                return(new MethodInvocation(reference, type, method, substitution));
            }

            CSharpElementFactory factory = CSharpElementFactory.GetInstance(invocation.GetPsiModule());
            IReferenceExpression newInvokedExpression =
                invocation.InvokedExpression.ReplaceBy(factory.CreateReferenceExpression("$0", Executer.Method));

            return(new MethodInvocation(newInvokedExpression.Reference, type, method, substitution));
        }