Thursday, August 9, 2012

I am often asked about basic entities of ReSharper code model and relations between them. Here is a table that would help to understand basic principles. Read the table below from left to right and then to top. For more infofrmation about the SDK see: this page

ITreeNode IReference IDeclaredElement IDeclaration
ITreeNode id .GetReferences() node as IDeclaration
IReference .GetTreeNode() id .Resolve().DeclaredElement
IDeclaredElement IPsiService.Finder.FindReferences(...) id .GetDeclarations()
IDeclaration id .DeclaredElement id