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.
Пространство имён: Tessa.Properties.ResharperСборка: Tessa (в Tessa.dll) Версия: 4.1.4+115fce864fec7bf37ea70396e6660596be991d3b
public MustDisposeResourceAttribute(
bool value = true
)
Public Sub New (
Optional value As Boolean = true
)
public:
MustDisposeResourceAttribute(
bool value = true
)
new :
?value : bool
(* Defaults:
let _value = defaultArg value true
*)
-> MustDisposeResourceAttribute
Параметры
- 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.