internal void AddSequencePoint(Mono.Cecil.Cil.SequencePoint point) { if (SequencePoints.All(s => s.GetIdentifier() != SequencePoint.GetIdentifier(point))) { SequencePoints.Add(new SequencePoint(point)); } }
internal void MergeFrom(SourceFile sourceFile) { foreach (var sequencePoint in sourceFile.SequencePoints) { if (SequencePoints.All(s => s.GetIdentifier() != sequencePoint.GetIdentifier())) { SequencePoints.Add(sequencePoint); } else { SequencePoints.First(s => s.GetIdentifier() == sequencePoint.GetIdentifier()).MergeFrom( sequencePoint); } } }
internal void AddResult(Mono.Cecil.Cil.SequencePoint sequencePoint, MutantMetaData mutantMetaData, bool mutantKilled) { string identifier = SequencePoint.GetIdentifier(sequencePoint); _readerWriterLock.EnterUpgradeableReadLock(); try { if (SequencePoints.All(s => s.GetIdentifier() != identifier)) { _readerWriterLock.EnterWriteLock(); SequencePoints.Add(new SequencePoint(sequencePoint)); _readerWriterLock.ExitWriteLock(); } } finally { _readerWriterLock.ExitUpgradeableReadLock(); } var sourceSequencePoint = SequencePoints.First(s => s.GetIdentifier() == identifier); sourceSequencePoint.AddResult(mutantMetaData, mutantKilled); }