Question

Extension functions and intellisense

Posted 3 years ago by Avatar 7Alpha7
It seems extensions functions are not covered by intellisense yet. With the huge use of Linq, it's really ennoying. Is this planned to be covered soon ?

[Modified at 12/05/2011 04:35 PM]

Comments (4)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Extension methods should currently be supported. Linq statements are still on the TODO list. I will write your request with the Linq TODO item.

Actipro Software Support
Posted 2 years ago by 7Alpha7

Hi,

I am still not convinced that extension methods are working properly. For example, I have this case :

In some sys.dll I have :

namespace sys {
    public static class Extensions {
        public static string getDeepErrorMessage(this Exception e) {
            StringBuilder sb = new StringBuilder();
            ...
            return sb.ToString();
        }
    }
}

 the sys.dll is added in the parsing context with :

IProjectAssembly projectAssembly = language.GetService<IProjectAssembly>();
projectAssembly.AssemblyReferences.AddFrom(reference.assemblyPath.Value);

 then in a source file like this :

using System;
using sw7.sys;

namespace test {
    public class Test {

        Exception e; 
        string s = Extensions.getDeepErrorMessage(e); //THIS WORKS WITH INTELLISENSE
        s = e. //THIS DOES NOT DISPLAYS THE  getDeepErrorMessage WITH INTELLISENSE

the Extensions class is seen with its static methods because they are displayed correctly behind the Extensions. ; but straight behind the Exception the extension methods are not seen.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

Hi,

I pasted your Extensions definition inside our sample project and ran it and then added code in our demo similar to what you have in the third snippet and getDeepErrorMessage showed in both cases for me. 

If you can't figure it out then please make a new very simple sample project that shows the issue and email that to our support address.  Rename any .zip file extensions so they don't get spam blocked.


Actipro Software Support
Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

I just wanted to let you know that we expect LINQ automated IntelliPrompt features to be added in the next maintenance release per this blog post.


Actipro Software Support
Information The latest build of this product (2014.1 build 0602) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.