mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
25 lines
399 B
C#
25 lines
399 B
C#
using System;
|
|
|
|
class Disposal : IDisposable
|
|
{
|
|
IDisposable field1, field2;
|
|
|
|
void Close()
|
|
{
|
|
field1.Dispose();
|
|
}
|
|
|
|
void IDisposable.Dispose()
|
|
{
|
|
Close();
|
|
}
|
|
|
|
public Disposal(IDisposable p1, object p2, System.IO.TextWriter fs, IDisposable p3)
|
|
{
|
|
field1 = p1;
|
|
if (p2 is IDisposable d)
|
|
d.Dispose();
|
|
fs.Dispose();
|
|
}
|
|
}
|