
[Modified at 12/05/2011 04:35 PM]
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.
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.
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.
Please log in to a validated account to post comments.