private static bool ShouldProcess(EncodedImage encodedImage, bool isLast) { // the last result should always be processed, whereas // an intermediate result should be processed only if valid return(isLast || EncodedImage.IsValid(encodedImage)); }
public void TestDoesntContainInvalid() { _encodedImage.Dispose(); Assert.IsTrue(_stagingArea.ContainsKey(_cacheKey)); Assert.IsTrue(EncodedImage.IsValid(_stagingArea.Get(_cacheKey))); }