X-Sharp / XSharpPublic

Public repository for the source code for the XSharp Compiler, Runtime, Project System and Tools.
Apache License 2.0
114 stars 38 forks source link

LINQ expressions do not show intellisense for object properties #6

Open mattslay opened 5 years ago

mattslay commented 5 years ago

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
RobertvanderHulst commented 5 years ago

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.