Structured search help (or is it a limitation?) Follow
I'm trying to search for occurances of
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?
Please sign in to leave a comment.
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.
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!
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!
in this case you create Expression placeholder, which has type restriction.
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.