WikiCrawler/Batch/NPGallery/NPGalleryUploader.cs
/// <summary>
/// Returns true if the specified item should be marked as complete and not uploaded.
/// </summary>
Returns true if the specified item should be marked as complete and not uploaded.
Returns true if the specified item should be marked as complete and not uploaded .
public override bool ShouldSkipForever(string key, Dictionary<string, string> metadata)
		{
			using (MD5 md5 = MD5.Create())
			{
				string imagePath = GetImageCacheFilename(key, metadata);
				using (FileStream stream = File.OpenRead(imagePath))
				{
					byte[] hash = md5.ComputeHash(stream);
					if (hash.SequenceEqual(m_corruptedRecordErrorHash))
					{
						return true;
					}
					if (hash.SequenceEqual(m_notAuthorizedHash))
					{
						return true;
					}
				}
			}
			return base.ShouldSkipForever(key, metadata);
		}
public override bool ShouldSkipForever ( string key , Dictionary < string , string > metadata ) { using ( MD5 md5 = MD5 . Create ( ) ) { string imagePath = GetImageCacheFilename ( key , metadata ) ; using ( FileStream stream = File . OpenRead ( imagePath ) ) { byte [ ] hash = md5 . ComputeHash ( stream ) ; if ( hash . SequenceEqual ( m_corruptedRecordErrorHash ) ) { return true ; } if ( hash . SequenceEqual ( m_notAuthorizedHash ) ) { return true ; } } } return base . ShouldSkipForever ( key , metadata ) ; }
Returns true if the specified item should be marked as complete and not uploaded.
Returns true if the specified item should be marked as complete and not uploaded .
key
string
metadata
Dictionary<string, string>