The JetBrains documentation for [Pure] is here:
It states that it is the same as System.Diagnostics.Contracts.PureAttribute.
However, it is not. The System.Diagnostics version has the following attribute usage:
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.Delegate,
AllowMultiple = false, Inherited = true)]
The JetBrains version has this:
This is a problem for me because I am currently going through the process of changing from using Microsoft Code Contracts (which is no longer supported) to Resharper Annotations.
I have a number of get-only properties that are declared as [Pure] using the Microsoft attribute, but I cannot change to using the Resharper [Pure] because it is not applicable to properties.
Would it be safe for me to change this to include AttributeTargets.Property in my version of the JetBrains annotations?
(And should the JetBrains version be changed to match the Microsoft one?)