Optimize Using statements
R
4.0 seems to have introduced an optmization on using statements that I'd like to avoid...
I have some code such as
using IDType = Guid;
public class Customer : IIdentifiable]]>
{
private IDType id;
....
}
In 3.1 this was left alone, but it 4.0 all the IDType references are replaced with Guid - the reason they are there in the first place is so I know what it an Id and what is simply a Guid; also makes it much easier to change the object identifier to Int32 for example.
Is there a way of turning this off whilst retaining removing redundant namespace using statements?
Regards
Paul
Please sign in to leave a comment.
Check the option:
ReSharper->Options->C#->NamespaceImports->"Do not remove using alias
directives if alias name differs from the imported type name"
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Hatcher" <no_reply@jetbrains.com> wrote in message
news:20131897.24591213951814240.JavaMail.jive@app4.labs.intellij.net...
>
>
>
>
>
>
>
>
When ticked it doesn't remove the "using IDType = Guid" line, but still replaces the instances of IDType with Guid
Paul
Thank you. I have to check this problem once more.
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Hatcher" <no_reply@jetbrains.com> wrote in message
news:8796091.42221214322762943.JavaMail.jive@app4.labs.intellij.net...
>
Any luck?
I can provide independent confirmation that checking the above-noted checkbox has no effect in build 931.
Sorry, I haven't you checked this.
Is this too serious problem for you to be fixed in 4.1?
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Hatcher" <no_reply@jetbrains.com> wrote in message
news:13303809.68681219694318366.JavaMail.jive@app4.labs.intellij.net...
Umm, it's eating all my aliases, which is essentially stopping me from running Code Cleanup, which is stopping me from committing as per my client's source control policy, which means that yes, it really should be fixed. :)
I'm unable to reproduce this problem.
Please could you try to create small solution which demonstrates this
problem and send it to me for analysis?
My e-mail is Eugene.Pasynkov (at) jetbrains.com
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Jeremy Gray" <no_reply@jetbrains.com> wrote in message
news:24866119.85091220021900804.JavaMail.jive@app4.labs.intellij.net...
I couldn't quickly reproduce it in an isolated solution, so I'll just have to keep an eye open for it and see if there are any patterns I can isolate.