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.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
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.