MustDisposeResourceAttribute - конструктор

Indicates that the resource disposal must be handled by the use site, meaning that the resource ownership is transferred to the callee. This annotation can be used to annotate disposable types or their constructors individually to enable the resource disposal IDE code analysis in every context where the new instance of this type is created. Factory methods and 'out' parameters can also be annotated to indicate that the return value of disposable type needs handling.

Definition

Пространство имён: Tessa.Properties.Resharper
Сборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
C#
public MustDisposeResourceAttribute(
	bool value = true
)

Параметры

value  Boolean  (Optional)
 

Заметки

Annotation of input parameters with this attribute is meaningless.
Constructors inherit this attribute from their type, if it is annotated, but not from the base constructors they delegate to (if any).
Resource disposal is expected to be expressed via either using (resource) statement, using var declaration, explicit 'Dispose' method call, or an argument passing to a parameter with the HandlesResourceDisposalAttribute attribute applied.

См. также