XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

LINQ expressions do not show intellisense for object properties

Open mattslay opened this issue 6 years ago • 1 comments

When typing a LINQ expression in Visual Studio in a function def inside a PRG, I expect to get Intellisense on property names from the typed objects referenced in the expression. All the type data is present in the variable declarations and assignments, and the code compiles and runs fine when I manually type the properties name in the code, so it should be popping up a list of properties on that object type when I type "o:"

2019-04-09_9-17-29

Function Start() As Void Strict
        
    Local cFilename As String
    Local  deserializer As XmlSerializer
    Local vcxRepo As VcxRepoModel
        
    cFilename := "h:\work\repos\xsharp.vfp\samples\scx form sample 1\vfp_form_sample_1.scx.xml"

    Var streamReader := StreamReader{cFilename};
        
    deserializer := XmlSerializer{typeof(VcxRepoModel)}
    vcxRepo := (VcxRepoModel) deserializer:Deserialize(streamReader)
        
    Var oClasses := From o In vcxRepo:Records Where o:IsClassDef == 1 Select o

mattslay avatar Apr 09 '19 14:04 mattslay

Matt, This is a known issue. Fabrice is working on support for all variations of the VAR command and on proper support for intellisense for Generics. Once that works he will have a look at Linq. Unfortunately LINQ is even more complicated, especially when you have statements that use grouping where the elements returned may return IGrouping<T,U> or a similar interface.

RobertvanderHulst avatar Apr 09 '19 17:04 RobertvanderHulst