JetBrains.Annotations.xml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>JetBrains.Annotations</name>
  5. </assembly>
  6. <members>
  7. <member name="T:JetBrains.Annotations.CanBeNullAttribute">
  8. <summary>
  9. Indicates that the value of the marked element could be <c>null</c> sometimes,
  10. so checking for <c>null</c> is required before its usage.
  11. </summary>
  12. <example><code>
  13. [CanBeNull] object Test() => null;
  14. void UseTest() {
  15. var p = Test();
  16. var s = p.ToString(); // Warning: Possible 'System.NullReferenceException'
  17. }
  18. </code></example>
  19. </member>
  20. <member name="T:JetBrains.Annotations.NotNullAttribute">
  21. <summary>
  22. Indicates that the value of the marked element can never be <c>null</c>.
  23. </summary>
  24. <example><code>
  25. [NotNull] object Foo() {
  26. return null; // Warning: Possible 'null' assignment
  27. }
  28. </code></example>
  29. </member>
  30. <member name="T:JetBrains.Annotations.ItemNotNullAttribute">
  31. <summary>
  32. Can be applied to symbols of types derived from IEnumerable as well as to symbols of Task
  33. and Lazy classes to indicate that the value of a collection item, of the Task.Result property
  34. or of the Lazy.Value property can never be null.
  35. </summary>
  36. <example><code>
  37. public void Foo([ItemNotNull]List&lt;string&gt; books)
  38. {
  39. foreach (var book in books) {
  40. if (book != null) // Warning: Expression is always true
  41. Console.WriteLine(book.ToUpper());
  42. }
  43. }
  44. </code></example>
  45. </member>
  46. <member name="T:JetBrains.Annotations.ItemCanBeNullAttribute">
  47. <summary>
  48. Can be applied to symbols of types derived from IEnumerable as well as to symbols of Task
  49. and Lazy classes to indicate that the value of a collection item, of the Task.Result property
  50. or of the Lazy.Value property can be null.
  51. </summary>
  52. <example><code>
  53. public void Foo([ItemCanBeNull]List&lt;string&gt; books)
  54. {
  55. foreach (var book in books)
  56. {
  57. // Warning: Possible 'System.NullReferenceException'
  58. Console.WriteLine(book.ToUpper());
  59. }
  60. }
  61. </code></example>
  62. </member>
  63. <member name="T:JetBrains.Annotations.StringFormatMethodAttribute">
  64. <summary>
  65. Indicates that the marked method builds string by the format pattern and (optional) arguments.
  66. The parameter, which contains the format string, should be given in constructor. The format string
  67. should be in <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/>-like form.
  68. </summary>
  69. <example><code>
  70. [StringFormatMethod("message")]
  71. void ShowError(string message, params object[] args) { /* do something */ }
  72. void Foo() {
  73. ShowError("Failed: {0}"); // Warning: Non-existing argument in format string
  74. }
  75. </code></example>
  76. </member>
  77. <member name="M:JetBrains.Annotations.StringFormatMethodAttribute.#ctor(System.String)">
  78. <param name="formatParameterName">
  79. Specifies which parameter of an annotated method should be treated as the format string
  80. </param>
  81. </member>
  82. <member name="T:JetBrains.Annotations.ValueProviderAttribute">
  83. <summary>
  84. Use this annotation to specify a type that contains static or const fields
  85. with values for the annotated property/field/parameter.
  86. The specified type will be used to improve completion suggestions.
  87. </summary>
  88. <example><code>
  89. namespace TestNamespace
  90. {
  91. public class Constants
  92. {
  93. public static int INT_CONST = 1;
  94. public const string STRING_CONST = "1";
  95. }
  96. public class Class1
  97. {
  98. [ValueProvider("TestNamespace.Constants")] public int myField;
  99. public void Foo([ValueProvider("TestNamespace.Constants")] string str) { }
  100. public void Test()
  101. {
  102. Foo(/*try completion here*/);//
  103. myField = /*try completion here*/
  104. }
  105. }
  106. }
  107. </code></example>
  108. </member>
  109. <member name="T:JetBrains.Annotations.InvokerParameterNameAttribute">
  110. <summary>
  111. Indicates that the function argument should be a string literal and match one
  112. of the parameters of the caller function. For example, ReSharper annotates
  113. the parameter of <see cref="T:System.ArgumentNullException"/>.
  114. </summary>
  115. <example><code>
  116. void Foo(string param) {
  117. if (param == null)
  118. throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol
  119. }
  120. </code></example>
  121. </member>
  122. <member name="T:JetBrains.Annotations.NotifyPropertyChangedInvocatorAttribute">
  123. <summary>
  124. Indicates that the method is contained in a type that implements
  125. <c>System.ComponentModel.INotifyPropertyChanged</c> interface and this method
  126. is used to notify that some property value changed.
  127. </summary>
  128. <remarks>
  129. The method should be non-static and conform to one of the supported signatures:
  130. <list>
  131. <item><c>NotifyChanged(string)</c></item>
  132. <item><c>NotifyChanged(params string[])</c></item>
  133. <item><c>NotifyChanged{T}(Expression{Func{T}})</c></item>
  134. <item><c>NotifyChanged{T,U}(Expression{Func{T,U}})</c></item>
  135. <item><c>SetProperty{T}(ref T, T, string)</c></item>
  136. </list>
  137. </remarks>
  138. <example><code>
  139. public class Foo : INotifyPropertyChanged {
  140. public event PropertyChangedEventHandler PropertyChanged;
  141. [NotifyPropertyChangedInvocator]
  142. protected virtual void NotifyChanged(string propertyName) { ... }
  143. string _name;
  144. public string Name {
  145. get { return _name; }
  146. set { _name = value; NotifyChanged("LastName"); /* Warning */ }
  147. }
  148. }
  149. </code>
  150. Examples of generated notifications:
  151. <list>
  152. <item><c>NotifyChanged("Property")</c></item>
  153. <item><c>NotifyChanged(() =&gt; Property)</c></item>
  154. <item><c>NotifyChanged((VM x) =&gt; x.Property)</c></item>
  155. <item><c>SetProperty(ref myField, value, "Property")</c></item>
  156. </list>
  157. </example>
  158. </member>
  159. <member name="T:JetBrains.Annotations.ContractAnnotationAttribute">
  160. <summary>
  161. Describes dependency between method input and output.
  162. </summary>
  163. <syntax>
  164. <p>Function Definition Table syntax:</p>
  165. <list>
  166. <item>FDT ::= FDTRow [;FDTRow]*</item>
  167. <item>FDTRow ::= Input =&gt; Output | Output &lt;= Input</item>
  168. <item>Input ::= ParameterName: Value [, Input]*</item>
  169. <item>Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value}</item>
  170. <item>Value ::= true | false | null | notnull | canbenull</item>
  171. </list>
  172. If the method has a single input parameter, its name could be omitted.<br/>
  173. Using <c>halt</c> (or <c>void</c>/<c>nothing</c>, which is the same) for the method output
  174. means that the method doesn't return normally (throws or terminates the process).<br/>
  175. Value <c>canbenull</c> is only applicable for output parameters.<br/>
  176. You can use multiple <c>[ContractAnnotation]</c> for each FDT row, or use single attribute
  177. with rows separated by semicolon. There is no notion of order rows, all rows are checked
  178. for applicability and applied per each program state tracked by the analysis engine.<br/>
  179. </syntax>
  180. <examples><list>
  181. <item><code>
  182. [ContractAnnotation("=&gt; halt")]
  183. public void TerminationMethod()
  184. </code></item>
  185. <item><code>
  186. [ContractAnnotation("null &lt;= param:null")] // reverse condition syntax
  187. public string GetName(string surname)
  188. </code></item>
  189. <item><code>
  190. [ContractAnnotation("s:null =&gt; true")]
  191. public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty()
  192. </code></item>
  193. <item><code>
  194. // A method that returns null if the parameter is null,
  195. // and not null if the parameter is not null
  196. [ContractAnnotation("null =&gt; null; notnull =&gt; notnull")]
  197. public object Transform(object data)
  198. </code></item>
  199. <item><code>
  200. [ContractAnnotation("=&gt; true, result: notnull; =&gt; false, result: null")]
  201. public bool TryParse(string s, out Person result)
  202. </code></item>
  203. </list></examples>
  204. </member>
  205. <member name="T:JetBrains.Annotations.LocalizationRequiredAttribute">
  206. <summary>
  207. Indicates whether the marked element should be localized.
  208. </summary>
  209. <example><code>
  210. [LocalizationRequiredAttribute(true)]
  211. class Foo {
  212. string str = "my string"; // Warning: Localizable string
  213. }
  214. </code></example>
  215. </member>
  216. <member name="T:JetBrains.Annotations.CannotApplyEqualityOperatorAttribute">
  217. <summary>
  218. Indicates that the value of the marked type (or its derivatives)
  219. cannot be compared using '==' or '!=' operators and <c>Equals()</c>
  220. should be used instead. However, using '==' or '!=' for comparison
  221. with <c>null</c> is always permitted.
  222. </summary>
  223. <example><code>
  224. [CannotApplyEqualityOperator]
  225. class NoEquality { }
  226. class UsesNoEquality {
  227. void Test() {
  228. var ca1 = new NoEquality();
  229. var ca2 = new NoEquality();
  230. if (ca1 != null) { // OK
  231. bool condition = ca1 == ca2; // Warning
  232. }
  233. }
  234. }
  235. </code></example>
  236. </member>
  237. <member name="T:JetBrains.Annotations.BaseTypeRequiredAttribute">
  238. <summary>
  239. When applied to a target attribute, specifies a requirement for any type marked
  240. with the target attribute to implement or inherit specific type or types.
  241. </summary>
  242. <example><code>
  243. [BaseTypeRequired(typeof(IComponent)] // Specify requirement
  244. class ComponentAttribute : Attribute { }
  245. [Component] // ComponentAttribute requires implementing IComponent interface
  246. class MyComponent : IComponent { }
  247. </code></example>
  248. </member>
  249. <member name="T:JetBrains.Annotations.UsedImplicitlyAttribute">
  250. <summary>
  251. Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library),
  252. so this symbol will not be reported as unused (as well as by other usage inspections).
  253. </summary>
  254. </member>
  255. <member name="T:JetBrains.Annotations.MeansImplicitUseAttribute">
  256. <summary>
  257. Can be applied to attributes, type parameters, and parameters of a type assignable from <see cref="T:System.Type"/> .
  258. When applied to an attribute, the decorated attribute behaves the same as <see cref="T:JetBrains.Annotations.UsedImplicitlyAttribute"/>.
  259. When applied to a type parameter or to a parameter of type <see cref="T:System.Type"/>, indicates that the corresponding type
  260. is used implicitly.
  261. </summary>
  262. </member>
  263. <member name="T:JetBrains.Annotations.ImplicitUseKindFlags">
  264. <summary>
  265. Specify the details of implicitly used symbol when it is marked
  266. with <see cref="T:JetBrains.Annotations.MeansImplicitUseAttribute"/> or <see cref="T:JetBrains.Annotations.UsedImplicitlyAttribute"/>.
  267. </summary>
  268. </member>
  269. <member name="F:JetBrains.Annotations.ImplicitUseKindFlags.Access">
  270. <summary>Only entity marked with attribute considered used.</summary>
  271. </member>
  272. <member name="F:JetBrains.Annotations.ImplicitUseKindFlags.Assign">
  273. <summary>Indicates implicit assignment to a member.</summary>
  274. </member>
  275. <member name="F:JetBrains.Annotations.ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature">
  276. <summary>
  277. Indicates implicit instantiation of a type with fixed constructor signature.
  278. That means any unused constructor parameters won't be reported as such.
  279. </summary>
  280. </member>
  281. <member name="F:JetBrains.Annotations.ImplicitUseKindFlags.InstantiatedNoFixedConstructorSignature">
  282. <summary>Indicates implicit instantiation of a type.</summary>
  283. </member>
  284. <member name="T:JetBrains.Annotations.ImplicitUseTargetFlags">
  285. <summary>
  286. Specify what is considered to be used implicitly when marked
  287. with <see cref="T:JetBrains.Annotations.MeansImplicitUseAttribute"/> or <see cref="T:JetBrains.Annotations.UsedImplicitlyAttribute"/>.
  288. </summary>
  289. </member>
  290. <member name="F:JetBrains.Annotations.ImplicitUseTargetFlags.Members">
  291. <summary>Members of entity marked with attribute are considered used.</summary>
  292. </member>
  293. <member name="F:JetBrains.Annotations.ImplicitUseTargetFlags.WithMembers">
  294. <summary>Entity marked with attribute and all its members considered used.</summary>
  295. </member>
  296. <member name="T:JetBrains.Annotations.PublicAPIAttribute">
  297. <summary>
  298. This attribute is intended to mark publicly available API
  299. which should not be removed and so is treated as used.
  300. </summary>
  301. </member>
  302. <member name="T:JetBrains.Annotations.InstantHandleAttribute">
  303. <summary>
  304. Tells code analysis engine if the parameter is completely handled when the invoked method is on stack.
  305. If the parameter is a delegate, indicates that delegate is executed while the method is executed.
  306. If the parameter is an enumerable, indicates that it is enumerated while the method is executed.
  307. </summary>
  308. </member>
  309. <member name="T:JetBrains.Annotations.PureAttribute">
  310. <summary>
  311. Indicates that a method does not make any observable state changes.
  312. The same as <c>System.Diagnostics.Contracts.PureAttribute</c>.
  313. </summary>
  314. <example><code>
  315. [Pure] int Multiply(int x, int y) => x * y;
  316. void M() {
  317. Multiply(123, 42); // Waring: Return value of pure method is not used
  318. }
  319. </code></example>
  320. </member>
  321. <member name="T:JetBrains.Annotations.MustUseReturnValueAttribute">
  322. <summary>
  323. Indicates that the return value of the method invocation must be used.
  324. </summary>
  325. <remarks>
  326. Methods decorated with this attribute (in contrast to pure methods) might change state,
  327. but make no sense without using their return value. <br/>
  328. Similarly to <see cref="T:JetBrains.Annotations.PureAttribute"/>, this attribute
  329. will help detecting usages of the method when the return value in not used.
  330. Additionally, you can optionally specify a custom message, which will be used when showing warnings, e.g.
  331. <code>[MustUseReturnValue("Use the return value to...")]</code>.
  332. </remarks>
  333. </member>
  334. <member name="T:JetBrains.Annotations.ProvidesContextAttribute">
  335. <summary>
  336. Indicates the type member or parameter of some type, that should be used instead of all other ways
  337. to get the value of that type. This annotation is useful when you have some "context" value evaluated
  338. and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one.
  339. </summary>
  340. <example><code>
  341. class Foo {
  342. [ProvidesContext] IBarService _barService = ...;
  343. void ProcessNode(INode node) {
  344. DoSomething(node, node.GetGlobalServices().Bar);
  345. // ^ Warning: use value of '_barService' field
  346. }
  347. }
  348. </code></example>
  349. </member>
  350. <member name="T:JetBrains.Annotations.PathReferenceAttribute">
  351. <summary>
  352. Indicates that a parameter is a path to a file or a folder within a web project.
  353. Path can be relative or absolute, starting from web root (~).
  354. </summary>
  355. </member>
  356. <member name="T:JetBrains.Annotations.SourceTemplateAttribute">
  357. <summary>
  358. An extension method marked with this attribute is processed by code completion
  359. as a 'Source Template'. When the extension method is completed over some expression, its source code
  360. is automatically expanded like a template at call site.
  361. </summary>
  362. <remarks>
  363. Template method body can contain valid source code and/or special comments starting with '$'.
  364. Text inside these comments is added as source code when the template is applied. Template parameters
  365. can be used either as additional method parameters or as identifiers wrapped in two '$' signs.
  366. Use the <see cref="T:JetBrains.Annotations.MacroAttribute"/> attribute to specify macros for parameters.
  367. </remarks>
  368. <example>
  369. In this example, the 'forEach' method is a source template available over all values
  370. of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block:
  371. <code>
  372. [SourceTemplate]
  373. public static void forEach&lt;T&gt;(this IEnumerable&lt;T&gt; xs) {
  374. foreach (var x in xs) {
  375. //$ $END$
  376. }
  377. }
  378. </code>
  379. </example>
  380. </member>
  381. <member name="T:JetBrains.Annotations.MacroAttribute">
  382. <summary>
  383. Allows specifying a macro for a parameter of a <see cref="T:JetBrains.Annotations.SourceTemplateAttribute">source template</see>.
  384. </summary>
  385. <remarks>
  386. You can apply the attribute on the whole method or on any of its additional parameters. The macro expression
  387. is defined in the <see cref="P:JetBrains.Annotations.MacroAttribute.Expression"/> property. When applied on a method, the target
  388. template parameter is defined in the <see cref="P:JetBrains.Annotations.MacroAttribute.Target"/> property. To apply the macro silently
  389. for the parameter, set the <see cref="P:JetBrains.Annotations.MacroAttribute.Editable"/> property value = -1.
  390. </remarks>
  391. <example>
  392. Applying the attribute on a source template method:
  393. <code>
  394. [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")]
  395. public static void forEach&lt;T&gt;(this IEnumerable&lt;T&gt; collection) {
  396. foreach (var item in collection) {
  397. //$ $END$
  398. }
  399. }
  400. </code>
  401. Applying the attribute on a template method parameter:
  402. <code>
  403. [SourceTemplate]
  404. public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) {
  405. /*$ var $x$Id = "$newguid$" + x.ToString();
  406. x.DoSomething($x$Id); */
  407. }
  408. </code>
  409. </example>
  410. </member>
  411. <member name="P:JetBrains.Annotations.MacroAttribute.Expression">
  412. <summary>
  413. Allows specifying a macro that will be executed for a <see cref="T:JetBrains.Annotations.SourceTemplateAttribute">source template</see>
  414. parameter when the template is expanded.
  415. </summary>
  416. </member>
  417. <member name="P:JetBrains.Annotations.MacroAttribute.Editable">
  418. <summary>
  419. Allows specifying which occurrence of the target parameter becomes editable when the template is deployed.
  420. </summary>
  421. <remarks>
  422. If the target parameter is used several times in the template, only one occurrence becomes editable;
  423. other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence,
  424. use values >= 0. To make the parameter non-editable when the template is expanded, use -1.
  425. </remarks>
  426. </member>
  427. <member name="P:JetBrains.Annotations.MacroAttribute.Target">
  428. <summary>
  429. Identifies the target parameter of a <see cref="T:JetBrains.Annotations.SourceTemplateAttribute">source template</see> if the
  430. <see cref="T:JetBrains.Annotations.MacroAttribute"/> is applied on a template method.
  431. </summary>
  432. </member>
  433. <member name="T:JetBrains.Annotations.AspMvcActionAttribute">
  434. <summary>
  435. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
  436. is an MVC action. If applied to a method, the MVC action name is calculated
  437. implicitly from the context. Use this attribute for custom wrappers similar to
  438. <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String)</c>.
  439. </summary>
  440. </member>
  441. <member name="T:JetBrains.Annotations.AspMvcAreaAttribute">
  442. <summary>
  443. ASP.NET MVC attribute. Indicates that the marked parameter is an MVC area.
  444. Use this attribute for custom wrappers similar to
  445. <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String)</c>.
  446. </summary>
  447. </member>
  448. <member name="T:JetBrains.Annotations.AspMvcControllerAttribute">
  449. <summary>
  450. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is
  451. an MVC controller. If applied to a method, the MVC controller name is calculated
  452. implicitly from the context. Use this attribute for custom wrappers similar to
  453. <c>System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String)</c>.
  454. </summary>
  455. </member>
  456. <member name="T:JetBrains.Annotations.AspMvcMasterAttribute">
  457. <summary>
  458. ASP.NET MVC attribute. Indicates that the marked parameter is an MVC Master. Use this attribute
  459. for custom wrappers similar to <c>System.Web.Mvc.Controller.View(String, String)</c>.
  460. </summary>
  461. </member>
  462. <member name="T:JetBrains.Annotations.AspMvcModelTypeAttribute">
  463. <summary>
  464. ASP.NET MVC attribute. Indicates that the marked parameter is an MVC model type. Use this attribute
  465. for custom wrappers similar to <c>System.Web.Mvc.Controller.View(String, Object)</c>.
  466. </summary>
  467. </member>
  468. <member name="T:JetBrains.Annotations.AspMvcPartialViewAttribute">
  469. <summary>
  470. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC
  471. partial view. If applied to a method, the MVC partial view name is calculated implicitly
  472. from the context. Use this attribute for custom wrappers similar to
  473. <c>System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String)</c>.
  474. </summary>
  475. </member>
  476. <member name="T:JetBrains.Annotations.AspMvcSuppressViewErrorAttribute">
  477. <summary>
  478. ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method.
  479. </summary>
  480. </member>
  481. <member name="T:JetBrains.Annotations.AspMvcDisplayTemplateAttribute">
  482. <summary>
  483. ASP.NET MVC attribute. Indicates that a parameter is an MVC display template.
  484. Use this attribute for custom wrappers similar to
  485. <c>System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String)</c>.
  486. </summary>
  487. </member>
  488. <member name="T:JetBrains.Annotations.AspMvcEditorTemplateAttribute">
  489. <summary>
  490. ASP.NET MVC attribute. Indicates that the marked parameter is an MVC editor template.
  491. Use this attribute for custom wrappers similar to
  492. <c>System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String)</c>.
  493. </summary>
  494. </member>
  495. <member name="T:JetBrains.Annotations.AspMvcTemplateAttribute">
  496. <summary>
  497. ASP.NET MVC attribute. Indicates that the marked parameter is an MVC template.
  498. Use this attribute for custom wrappers similar to
  499. <c>System.ComponentModel.DataAnnotations.UIHintAttribute(System.String)</c>.
  500. </summary>
  501. </member>
  502. <member name="T:JetBrains.Annotations.AspMvcViewAttribute">
  503. <summary>
  504. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
  505. is an MVC view component. If applied to a method, the MVC view name is calculated implicitly
  506. from the context. Use this attribute for custom wrappers similar to
  507. <c>System.Web.Mvc.Controller.View(Object)</c>.
  508. </summary>
  509. </member>
  510. <member name="T:JetBrains.Annotations.AspMvcViewComponentAttribute">
  511. <summary>
  512. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
  513. is an MVC view component name.
  514. </summary>
  515. </member>
  516. <member name="T:JetBrains.Annotations.AspMvcViewComponentViewAttribute">
  517. <summary>
  518. ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter
  519. is an MVC view component view. If applied to a method, the MVC view component view name is default.
  520. </summary>
  521. </member>
  522. <member name="T:JetBrains.Annotations.AspMvcActionSelectorAttribute">
  523. <summary>
  524. ASP.NET MVC attribute. When applied to a parameter of an attribute,
  525. indicates that this parameter is an MVC action name.
  526. </summary>
  527. <example><code>
  528. [ActionName("Foo")]
  529. public ActionResult Login(string returnUrl) {
  530. ViewBag.ReturnUrl = Url.Action("Foo"); // OK
  531. return RedirectToAction("Bar"); // Error: Cannot resolve action
  532. }
  533. </code></example>
  534. </member>
  535. <member name="T:JetBrains.Annotations.RazorSectionAttribute">
  536. <summary>
  537. Razor attribute. Indicates that the marked parameter or method is a Razor section.
  538. Use this attribute for custom wrappers similar to
  539. <c>System.Web.WebPages.WebPageBase.RenderSection(String)</c>.
  540. </summary>
  541. </member>
  542. <member name="T:JetBrains.Annotations.CollectionAccessAttribute">
  543. <summary>
  544. Indicates how method, constructor invocation, or property access
  545. over collection type affects the contents of the collection.
  546. Use <see cref="P:JetBrains.Annotations.CollectionAccessAttribute.CollectionAccessType"/> to specify the access type.
  547. </summary>
  548. <remarks>
  549. Using this attribute only makes sense if all collection methods are marked with this attribute.
  550. </remarks>
  551. <example><code>
  552. public class MyStringCollection : List&lt;string&gt;
  553. {
  554. [CollectionAccess(CollectionAccessType.Read)]
  555. public string GetFirstString()
  556. {
  557. return this.ElementAt(0);
  558. }
  559. }
  560. class Test
  561. {
  562. public void Foo()
  563. {
  564. // Warning: Contents of the collection is never updated
  565. var col = new MyStringCollection();
  566. string x = col.GetFirstString();
  567. }
  568. }
  569. </code></example>
  570. </member>
  571. <member name="T:JetBrains.Annotations.CollectionAccessType">
  572. <summary>
  573. Provides a value for the <see cref="T:JetBrains.Annotations.CollectionAccessAttribute"/> to define
  574. how the collection method invocation affects the contents of the collection.
  575. </summary>
  576. </member>
  577. <member name="F:JetBrains.Annotations.CollectionAccessType.None">
  578. <summary>Method does not use or modify content of the collection.</summary>
  579. </member>
  580. <member name="F:JetBrains.Annotations.CollectionAccessType.Read">
  581. <summary>Method only reads content of the collection but does not modify it.</summary>
  582. </member>
  583. <member name="F:JetBrains.Annotations.CollectionAccessType.ModifyExistingContent">
  584. <summary>Method can change content of the collection but does not add new elements.</summary>
  585. </member>
  586. <member name="F:JetBrains.Annotations.CollectionAccessType.UpdatedContent">
  587. <summary>Method can add new elements to the collection.</summary>
  588. </member>
  589. <member name="T:JetBrains.Annotations.AssertionMethodAttribute">
  590. <summary>
  591. Indicates that the marked method is assertion method, i.e. it halts the control flow if
  592. one of the conditions is satisfied. To set the condition, mark one of the parameters with
  593. <see cref="T:JetBrains.Annotations.AssertionConditionAttribute"/> attribute.
  594. </summary>
  595. </member>
  596. <member name="T:JetBrains.Annotations.AssertionConditionAttribute">
  597. <summary>
  598. Indicates the condition parameter of the assertion method. The method itself should be
  599. marked by <see cref="T:JetBrains.Annotations.AssertionMethodAttribute"/> attribute. The mandatory argument of
  600. the attribute is the assertion type.
  601. </summary>
  602. </member>
  603. <member name="T:JetBrains.Annotations.AssertionConditionType">
  604. <summary>
  605. Specifies assertion type. If the assertion method argument satisfies the condition,
  606. then the execution continues. Otherwise, execution is assumed to be halted.
  607. </summary>
  608. </member>
  609. <member name="F:JetBrains.Annotations.AssertionConditionType.IS_TRUE">
  610. <summary>Marked parameter should be evaluated to true.</summary>
  611. </member>
  612. <member name="F:JetBrains.Annotations.AssertionConditionType.IS_FALSE">
  613. <summary>Marked parameter should be evaluated to false.</summary>
  614. </member>
  615. <member name="F:JetBrains.Annotations.AssertionConditionType.IS_NULL">
  616. <summary>Marked parameter should be evaluated to null value.</summary>
  617. </member>
  618. <member name="F:JetBrains.Annotations.AssertionConditionType.IS_NOT_NULL">
  619. <summary>Marked parameter should be evaluated to not null value.</summary>
  620. </member>
  621. <member name="T:JetBrains.Annotations.TerminatesProgramAttribute">
  622. <summary>
  623. Indicates that the marked method unconditionally terminates control flow execution.
  624. For example, it could unconditionally throw exception.
  625. </summary>
  626. </member>
  627. <member name="T:JetBrains.Annotations.LinqTunnelAttribute">
  628. <summary>
  629. Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select,
  630. .Where). This annotation allows inference of [InstantHandle] annotation for parameters
  631. of delegate type by analyzing LINQ method chains.
  632. </summary>
  633. </member>
  634. <member name="T:JetBrains.Annotations.NoEnumerationAttribute">
  635. <summary>
  636. Indicates that IEnumerable passed as a parameter is not enumerated.
  637. Use this annotation to suppress the 'Possible multiple enumeration of IEnumerable' inspection.
  638. </summary>
  639. <example><code>
  640. static void ThrowIfNull&lt;T&gt;([NoEnumeration] T v, string n) where T : class
  641. {
  642. // custom check for null but no enumeration
  643. }
  644. void Foo(IEnumerable&lt;string&gt; values)
  645. {
  646. ThrowIfNull(values, nameof(values));
  647. var x = values.ToList(); // No warnings about multiple enumeration
  648. }
  649. </code></example>
  650. </member>
  651. <member name="T:JetBrains.Annotations.RegexPatternAttribute">
  652. <summary>
  653. Indicates that the marked parameter is a regular expression pattern.
  654. </summary>
  655. </member>
  656. <member name="T:JetBrains.Annotations.NoReorderAttribute">
  657. <summary>
  658. Prevents the Member Reordering feature from tossing members of the marked class.
  659. </summary>
  660. <remarks>
  661. The attribute must be mentioned in your member reordering patterns.
  662. </remarks>
  663. </member>
  664. <member name="T:JetBrains.Annotations.XamlItemsControlAttribute">
  665. <summary>
  666. XAML attribute. Indicates the type that has <c>ItemsSource</c> property and should be treated
  667. as <c>ItemsControl</c>-derived type, to enable inner items <c>DataContext</c> type resolve.
  668. </summary>
  669. </member>
  670. <member name="T:JetBrains.Annotations.XamlItemBindingOfItemsControlAttribute">
  671. <summary>
  672. XAML attribute. Indicates the property of some <c>BindingBase</c>-derived type, that
  673. is used to bind some item of <c>ItemsControl</c>-derived type. This annotation will
  674. enable the <c>DataContext</c> type resolve for XAML bindings for such properties.
  675. </summary>
  676. <remarks>
  677. Property should have the tree ancestor of the <c>ItemsControl</c> type or
  678. marked with the <see cref="T:JetBrains.Annotations.XamlItemsControlAttribute"/> attribute.
  679. </remarks>
  680. </member>
  681. </members>
  682. </doc>