private void ProgramContextReleased(object sender, ContextEventArgs contextEventArgs) { var programContext = contextEventArgs.Context as IProgramContext; if (programContext != null) { programContext.ProgramStarted -= ProgramContextProgramStarted; programContext.ProgramEnded -= ProgramContextProgramEnded; programContext.SequenceStarted -= context_SequenceStarted; programContext.SequenceEnded -= context_SequenceEnded; } }
private void ProgramContextCreated(object sender, ContextEventArgs contextEventArgs) { var programContext = contextEventArgs.Context as IProgramContext; // // This is always null... why does this event get called? // if (programContext != null) { //_programContexts.Add(programContext); programContext.ProgramStarted += ProgramContextProgramStarted; programContext.ProgramEnded += ProgramContextProgramEnded; programContext.SequenceStarted += context_SequenceStarted; programContext.SequenceEnded += context_SequenceEnded; } }
private void ProgramContextCreated(object sender, ContextEventArgs contextEventArgs) { var programContext = contextEventArgs.Context as IProgramContext; if (programContext != null) { _programContexts.Add(programContext); programContext.ProgramStarted += ProgramContextProgramStarted; programContext.ProgramEnded += ProgramContextProgramEnded; } }
private void ProgramContextReleased(object sender, ContextEventArgs contextEventArgs) { var programContext = contextEventArgs.Context as IProgramContext; if (programContext != null) { programContext.ProgramStarted -= ProgramContextProgramStarted; programContext.ProgramEnded -= ProgramContextProgramEnded; _programContexts.Remove(programContext); } }
void Contexts_ContextReleased(object sender, ContextEventArgs e) { IContext sequenceContext = e.Context as IContext; if (sequenceContext != null) { sequenceContext.ContextStarted -= sequenceContext_ContextStarted; sequenceContext.ContextEnded -= sequenceContext_ContextEnded; } }