Skip to content

Instantly share code, notes, and snippets.

@mikaelnet
Created September 12, 2019 19:02
Show Gist options
  • Save mikaelnet/cd6bd04ee2ed993cb6264a17d5558412 to your computer and use it in GitHub Desktop.
Save mikaelnet/cd6bd04ee2ed993cb6264a17d5558412 to your computer and use it in GitHub Desktop.
Sample ReSharper ExternalAnnotations file for Sitecore.Kernel
<?xml version="1.0" encoding="utf-8"?>
<assembly name="Sitecore.Kernel">
<member name="P:Sitecore.Data.Items.Item.Languages">
<attribute ctor="M:System.ObsoleteAttribute.#ctor(System.String,System.Boolean)">
<argument>This method returns ALL installed languages in the system. Not the available languages on the actual item. Use the LanguageManager to get all languages</argument>
<argument>true</argument>
</attribute>
</member>
<member name="M:Sitecore.Data.Items.ItemAxes.GetDescendant(System.String)">
<attribute ctor="M:System.ObsoleteAttribute.#ctor(System.String,System.Boolean)">
<argument>This method may be very heavy. Consider using content search instead</argument>
<argument>false</argument>
</attribute>
</member>
<member name="M:Sitecore.Data.Items.ItemAxes.GetDescendants">
<attribute ctor="M:System.ObsoleteAttribute.#ctor(System.String,System.Boolean)">
<argument>This method may be very heavy. Consider using content search instead</argument>
<argument>false</argument>
</attribute>
</member>
<member name="M:Sitecore.Data.Items.ItemAxes.GetDescendant(Sitecore.Data.Items.Item,System.String)">
<attribute ctor="M:System.ObsoleteAttribute.#ctor(System.String,System.Boolean)">
<argument>This method may be very heavy. Consider using content search instead</argument>
<argument>false</argument>
</attribute>
</member>
<member name="M:Sitecore.Data.Query.QueryParser.GetDescendants">
<attribute ctor="M:System.ObsoleteAttribute.#ctor(System.String,System.Boolean)">
<argument>This method may be very heavy. Consider using content search instead</argument>
<argument>false</argument>
</attribute>
</member>
<member name="M:Sitecore.Data.Query.QueryParser.GetDescendantsAxis">
<attribute ctor="M:System.ObsoleteAttribute.#ctor(System.String,System.Boolean)">
<argument>This method may be very heavy. Consider using content search instead</argument>
<argument>false</argument>
</attribute>
</member>
<member
name="M:Sitecore.Abstractions.BaseItemManager.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Abstractions.BaseItemManager.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database,Sitecore.SecurityModel.SecurityCheck)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Abstractions.BaseItemManager.GetItem(System.String,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Abstractions.BaseItemManager.GetItem(System.String,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database,Sitecore.SecurityModel.SecurityCheck)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(Sitecore.Data.ID)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Database.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language,Sitecore.Data.Version)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(System.String)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(System.String,Sitecore.Globalization.Language)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(System.String,Sitecore.Globalization.Language,Sitecore.Data.Version)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(Sitecore.Data.DataUri)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(Sitecore.Data.ItemUri)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Data.Database.GetItem(Sitecore.Data.ItemUri,System.Boolean)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Managers.DefaultItemManager.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database,Sitecore.SecurityModel.SecurityCheck)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Managers.DefaultItemManager.GetItem(System.String,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database,Sitecore.SecurityModel.SecurityCheck)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Managers.ItemManager.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Managers.ItemManager.GetItem(Sitecore.Data.ID,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database,Sitecore.SecurityModel.SecurityCheck)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Managers.ItemManager.GetItem(System.String,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Data.Managers.ItemManager.GetItem(System.String,Sitecore.Globalization.Language,Sitecore.Data.Version,Sitecore.Data.Database,Sitecore.SecurityModel.SecurityCheck)">
<attribute ctor="M:JetBrains.Annotations.CanBeNullAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ArgumentCondition(System.Boolean,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ArgumentNotNull(System.Object,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ArgumentNotNull(System.Object,System.Func{System.String})">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(Sitecore.Data.ID,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(System.String,System.Func{System.String})">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.AreEqual(System.Int32,System.Int32,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.AreEqual(System.Int32,System.Int32,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.AreEqual(System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.AreEqual(System.String,System.String,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.AreEqual(System.Boolean,System.Boolean,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.AreEqual(System.Boolean,System.Boolean,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.CanRunApplication(System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.HasAccess(System.Boolean,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.HasAccess(System.Boolean,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.HasAccess(System.Boolean,System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.HasAccess(System.Boolean,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsEditing(Sitecore.Data.Items.Item)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsFalse(System.Boolean,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsFalse(System.Boolean,System.Func{System.String})">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsFalse(System.Boolean,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.String,System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.Type)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.Type,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member
name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.Type,System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNull(System.Object,System.Type,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNullOrEmpty(System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNullOrEmpty(System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNotNullOrEmpty(System.String,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNull(System.Object,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsNull(System.Object,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsTrue(System.Boolean,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsTrue(System.Boolean,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsTrue(System.Boolean,System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsTrue(System.Boolean,System.Func{System.String})">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.IsTrue(System.Boolean,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ReflectionObjectCreated(System.Object,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.Required(System.Object,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.Required(System.Object,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.Required(System.Object,System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ResultNotNull``1(``0,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ResultNotNull``1(``0,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ResultNotNull``1(``0,System.String,System.String,System.String)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
<member name="M:Sitecore.Diagnostics.Assert.ResultNotNull``1(``0)">
<attribute ctor="M:JetBrains.Annotations.AssertionMethodAttribute.#ctor" />
</member>
</assembly>
@mikaelnet
Copy link
Author

This gist is just an example of how external annotations can be used as described in this blog post: https://mikael.com/2019/09/improving-sitecore-code-quality-with-resharper-external-annotations/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment