public void Constructor_CopyInputTest() { byte[] b = new byte[] { 1, 1 }; JunkRegion jr = new JunkRegion(b); b[1] = 2; Assert.AreEqual(1, jr.Bytes[1]); }
public void Bytes_NotWritableTest() { JunkRegion jr = new JunkRegion(new byte[10]); IList<byte> bytes = jr.Bytes; Assert.AreEqual(10, bytes.Count); // Modify junk region data bytes[9] = 0xFF; }
public void FoundMp3FrameEventHandler(FoundMp3FrameEventArgs e) { if (mp3FrameCount > 0 && shouldCalculateCrc) { if (previousJunkRegion != null) { // The previous junk region is part of the music crc calcCrc.AddToCrc(previousJunkRegion.Bytes); } calcCrc.AddToCrc(e.Region.Bytes); } previousJunkRegion = null; mp3FrameCount++; }
/// <summary> /// Constructor /// </summary> /// <param name="junkRegion"></param> public FoundJunkRegionEventArgs(JunkRegion junkRegion) { this.junkRegion = junkRegion; }
public void FoundJunkRegionEventHandler(FoundJunkRegionEventArgs e) { previousJunkRegion = e.Region; }