ReSharper 4.5 and Microsoft Code Contracts

What should I do for the Resharper to pick up Contract.Assume/Require/Invariant as the not-null check?

Creating custom XML for Microsoft.Contracts.dll containing annotations like the following won't help.

Also, note that WYSIWYG editor in the forum wont display at all in Opera 10 and looks horribly corrupted in IE8 (can't get the code formatting to work properly at all)

<

member name="M:Microsoft.Contracts.Contract.Assume(System.Boolean)">

<


attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor"/>

<


parameter name="condition">

<


attribute ctor="M:JetBrains.Annotations.AssertionConditionAttribute.#ctor(JetBrains.Annotations.AssertionConditionType)">

<


argument>0</argument>

</


attribute>

</


parameter>

</


member>

6 comments

Hello Alexander
     Could you please attach your .xml file for Microsoft.Contracts.dll? Thank you!

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"
0

Editor works fine in Opera 10 if you go to site preferences and select identify as firefox.  The site needs to not treat opera differently, as that is a real pain!

0

Hi Alexander,

I've attached the XML I created for use with the Microsoft Code Contracts
library.  I hope it works for you.

Cheers,
Mike

"Alexander Nikitin" <no_reply@jetbrains.com> wrote in message
news:8944679.30591253461146978.JavaMail.clearspace@app8.labs.intellij.net...

What should I do for the Resharper to pick up
Contract.Assume/Require/Invariant as the not-null check?
Creating custom XML for Microsoft.Contracts.dll containing annotations
like the following won't help.

>

Also, note that WYSIWYG editor in the forum wont display at all in Opera
10 and looks horribly corrupted in IE8 (can't get the code formatting to
work properly at all)

>

<

>

member name="M:Microsoft.Contracts.Contract.Assume(System.Boolean)"><

>
>

attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor"/><

>
>

parameter name="condition"><

>
>

attribute
ctor="M:JetBrains.Annotations.AssertionConditionAttribute.#ctor(JetBrains.Annotations.AssertionConditionType)"><

>
>

argument>0</argument></

>
>

attribute></

>
>

parameter></

>
>

member>

>
>

---
Original message URL:
http://www.jetbrains.net/devnet/message/5245532#5245532

0

Apologies, it seems the attachment didn't survive the migration from the
newsgroups to the forums.  Here is a link:

http://72.167.90.173/Microsoft.Contracts.xml.zip

Cheers,
Mike

"Mike Strobel" <mike.strobel@gmail.com> wrote in message
news:h9asj2$hti$1@is.intellij.net...

Hi Alexander,

>

I've attached the XML I created for use with the Microsoft Code Contracts
library.  I hope it works for you.

>

Cheers,
Mike

>

"Alexander Nikitin" <no_reply@jetbrains.com> wrote in message
news:8944679.30591253461146978.JavaMail.clearspace@app8.labs.intellij.net...

>> What should I do for the Resharper to pick up
>> Contract.Assume/Require/Invariant as the not-null check?
>> Creating custom XML for Microsoft.Contracts.dll containing annotations
>> like the following won't help.
>>
>> Also, note that WYSIWYG editor in the forum wont display at all in Opera
>> 10 and looks horribly corrupted in IE8 (can't get the code formatting to
>> work properly at all)
>>
>> <
>>
>> member name="M:Microsoft.Contracts.Contract.Assume(System.Boolean)"><
>>
>>
>> attribute
>> ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor"/><
>>
>>
>> parameter name="condition"><
>>
>>
>> attribute
>> ctor="M:JetBrains.Annotations.AssertionConditionAttribute.#ctor(JetBrains.Annotations.AssertionConditionType)"><
>>
>>
>> argument>0</argument></
>>
>>
>> attribute></
>>
>>
>> parameter></
>>
>>
>> member>
>>
>>
>> ---
>> Original message URL:
>> http://www.jetbrains.net/devnet/message/5245532#5245532

0

Hi Andrey,

I have the same problem as Mike ( in the same thread ) with Microsoft Code Contracts and ReSharper 5:

1. Would you send me the xml file that fix it or there's another solution?
2. How do I use the xml file?

Thanks,

Leo

0

Please sign in to leave a comment.