Unwrap strings in SSR

Is it possible to unwrap options from strings?

I want to write following SSR

$query$.Include("$include$") // or $query$.Include($include$)


$query$.Include(x => x.$include$)

$query$ : Expression of IQueryable<> or derived type
$include$ : Identifier.

But of course this does not work:
- variant with "$include" could not find any matches
- variant with $include$ finds matches but fails to replace.

My questions are:
1. Is it possible to write plugin which will make such replacements possible in general?
2. OR could you provide ability to write such patterns?
3. OR could you provide patterns where replacement from magic string to lambda where is possible?

Please sign in to leave a comment.