IDS peak ICV
v1.3.0
Loading...
Searching...
No Matches
DisposableList.cs
Go to the documentation of this file.
1
namespace
IDSImaging.Peak.ICV.Types
;
2
8
public
class
DisposableList
<T> : List<T>, IDisposable where T : IDisposable
9
{
10
private
bool
_disposed;
11
16
public
DisposableList
(List<T> list) : base(list)
17
{
18
}
19
24
public
DisposableList
()
25
{
26
}
27
32
public
void
Dispose
()
33
{
34
if
(_disposed)
35
{
36
return
;
37
}
38
39
foreach
(T? disposable
in
this
)
40
{
41
disposable.Dispose();
42
}
43
44
_disposed =
true
;
45
GC.SuppressFinalize(
this
);
46
}
47
52
~DisposableList
()
53
{
54
Dispose
();
55
}
56
}
IDSImaging.Peak.ICV.Types.DisposableList
A list that automatically calls IDisposable.Dispose on all its elements when disposed.
Definition
DisposableList.cs:9
IDSImaging.Peak.ICV.Types.DisposableList.DisposableList
DisposableList(List< T > list)
Creates a new instance of DisposableList<T> with an existing list.
Definition
DisposableList.cs:16
IDSImaging.Peak.ICV.Types.DisposableList.Dispose
void Dispose()
Disposes all elements.
Definition
DisposableList.cs:32
IDSImaging.Peak.ICV.Types.DisposableList.DisposableList
DisposableList()
Creates an empty instance of DisposableList<T>.
Definition
DisposableList.cs:24
IDSImaging.Peak.ICV.Types
Definition
BinningFactor.cs:3
peak_icv
Types
DisposableList.cs
Send mail feedback
Generated on Mon Apr 20 2026 - ©
IDS Imaging Development Systems GmbH