MalwareSourceCode/MSIL/Virus/Win32/S/Virus.Win32.Sality.sil-906e49d7772808af1fb67511fd33b01c809079fddb77015425883ca9739cad33/DisposableContainer.cs
2022-08-18 06:28:56 -05:00

31 lines
1.0 KiB
C#

// Decompiled with JetBrains decompiler
// Type: Autodesk.AutoCAD.ADMigrator.DisposableContainer
// Assembly: ADMigrator, Version=18.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 1EA8663B-E949-4FAD-ABC5-280393847F56
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Sality.sil-906e49d7772808af1fb67511fd33b01c809079fddb77015425883ca9739cad33.exe
using System;
using System.Collections.Generic;
namespace Autodesk.AutoCAD.ADMigrator
{
internal class DisposableContainer : IDisposable
{
private IList<IDisposable> m_objectList = (IList<IDisposable>) new List<IDisposable>();
internal void AddDisposableObject(IDisposable disposable)
{
if (disposable == null || this.m_objectList.Contains(disposable))
return;
this.m_objectList.Add(disposable);
}
public void Dispose()
{
foreach (IDisposable disposable in (IEnumerable<IDisposable>) this.m_objectList)
disposable.Dispose();
this.m_objectList.Clear();
}
}
}