Get DocumentRange for just method name

8 views
Skip to first unread message

Martin K

unread,
May 25, 2018, 9:40:34 AM5/25/18
to resharper-plugins
Hi,

For an IVariableDeclaration element, I can call element.NameIdentifier.GetDocumentRange() to get the DocumentRange for just the variable name.

How do I get a DocumentRange for just the method name from an IInvocationExpression?

Eg. for a method invocation such as:
someClass.SomeSubClass.SomeMethod(someArgument, someOtherArgument);

I want a document range for just SomeMethod.

Martin 

Matt Ellis

unread,
Jun 4, 2018, 7:54:03 AM6/4/18
to resharper-plugins
Hi. I think you can get this using invocation.InvokedExpression.GetDocumentRange().

Regards
Matt
Reply all
Reply to author
Forward
0 new messages