private void RaisePlaybackStoppedEvent(Exception e)
{
var handler = PlaybackStopped;
if (handler != null)
{
if (this.syncContext == null)
{
handler(this, new StoppedEventArgs(e));
}
else
{
this.syncContext.Post(state => handler(this, new StoppedEventArgs(e)), null);
}
}
}
}