use generic for CSharpResolveContext