dispose players
This commit is contained in:
parent
2fe9ae0ccb
commit
5fc511bd9b
|
@ -154,3 +154,4 @@ $RECYCLE.BIN/
|
|||
|
||||
# Mac desktop service store files
|
||||
.DS_Store
|
||||
/VsDingExtensionProject/pingme.txt
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
[Guid(GuidList.guidVsDingExtensionProjectPkgString)]
|
||||
[ProvideAutoLoad("{f1536ef8-92ec-443c-9ed7-fdadf150da82}")]
|
||||
[ProvideOptionPage(typeof(OptionsDialog), "Ding", "Options", 0, 0, true)]
|
||||
public sealed class VsDingExtensionProjectPackage : Package
|
||||
public sealed class VsDingExtensionProjectPackage : Package, IDisposable
|
||||
{
|
||||
private DTE2 applicationObject;
|
||||
private AddIn addInInstance;
|
||||
|
@ -141,5 +141,23 @@
|
|||
return activeProcId == procId;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
SafeDispose(this.debugSoundPlayer);
|
||||
SafeDispose(this.buildCompleteSoundPlayer);
|
||||
SafeDispose(this.testCompleteSoundPlayer);
|
||||
}
|
||||
|
||||
private void SafeDispose(SoundPlayer soundPlayer)
|
||||
{
|
||||
try
|
||||
{
|
||||
soundPlayer.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ActivityLog.LogError(this.GetType().FullName, "Error when disposing player: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Id="26ba08d0-0d25-4479-8684-3054dd122876" Version="1.3" Language="en-US" Publisher="Vitalii Ganzha" />
|
||||
<Identity Id="26ba08d0-0d25-4479-8684-3054dd122876" Version="1.4" Language="en-US" Publisher="Vitalii Ganzha" />
|
||||
<DisplayName>Visual Studio Ding extension</DisplayName>
|
||||
<Description xml:space="preserve">This small extension will play notification sounds when following events occur:
|
||||
- Build Complete
|
||||
|
|
Loading…
Reference in New Issue