Structured search help (or is it a limitation?)

He

I'm trying to search for occurances of

foo.SomeProp

where foo is a identifier (or expression) of a type which derives from (or is) of type FooClass
and SomeProp is a property of type PropClass

The problem seems to be that I cant create a placeholder for an identifier of a particular type, or is it a problem with property accessors?

0
5 comments

You need to make "foo" an expression placeholder, and make that of type PropClass. An identifier placeholder is for matching identifiers, that is, names of variables, fields, parameters, etc.

0

If I do that then I still need to match the SomeProp part, which if I use a typed expression for that it doesnt match, and identifiers cant be typed!

0

The SomeProp part is just entered as text. So the pattern is "$foo$.SomeProp". It will find all properties called "SomeProp" on an expression with type Thingy.PropClass. You don't need to put a placeholder in for the property name, because you already know it!

0

Hi David,
in this case you create Expression placeholder, which has type restriction.

0

the properties can be called anything, but they are of a specific type.

I'm actually looking for references between Entity Framework entities primarily, and I know both the parent amnd the navigartion property inherit from CommonEntityBase.

0

Please sign in to leave a comment.