Example #1
0
        private void InitializeStartParametrs(ILogger logger)
        {
            this.urls             = new HashSet <string>();
            this.imageCounter     = 1;
            this.totalSize        = 0;
            this.MaxPage          = int.MaxValue;
            this.SkipSameFiles    = true;
            this.imagesDownloaded = 0;
            this.l              = logger;
            this.sizeLock       = new object();
            this.lastPageInBlog = 0;
            this.PictureSize    = PicSize.Size1280;
            this.ImageTextName  = string.Empty;
            this.StartPage      = 0;
            this.startString    = "\"photo-url-" + (int)this.size + "\":\"";
            this.fileTypes      = new Dictionary <string, bool>
            {
                { "jpg", true },
                { "png", true },
                { "gif", true }
            };

            this.CounterFormat = 4;
            this.FilenameType  = FilenameType.Counter;
            this.clientList    = new List <WebClient>();
            this.isAborted     = true;
            this.filesLeft     = new ConcurrentDictionary <string, bool>();
        }
Example #2
0
 private void LoadNameAttribute(int startOffset)
 {
     // Read in the bytes, then parse them.
     ParentDirectory = BitConverter.ToUInt64(_data, startOffset) & 0xFFFFFF;
     AllocatedSize   = BitConverter.ToUInt64(_data, startOffset + 40);
     ActualSize      = BitConverter.ToUInt64(_data, startOffset + 48);
     FileNameLength  = _data[startOffset + 64];
     FileNameType    = (FilenameType)_data[startOffset + 65];
     if (FileName == null && FileNameType != FilenameType.Dos)               // Don't bother reading DOS (8.3) filenames
     {
         FileName = Encoding.Unicode.GetString(_data, startOffset + 66, FileNameLength * 2);
     }
 }
		private void LoadNameAttribute(int startOffset) {
			// Read in the bytes, then parse them.
			ParentDirectory = BitConverter.ToUInt64(_data, startOffset) & 0xFFFFFF;
			AllocatedSize = BitConverter.ToUInt64(_data, startOffset + 40);
			ActualSize = BitConverter.ToUInt64(_data, startOffset + 48);
			FileNameLength = _data[startOffset + 64];
			FileNameType = (FilenameType)_data[startOffset + 65];
			if (FileName == null && FileNameType != FilenameType.Dos) { // Don't bother reading DOS (8.3) filenames
				FileName = Encoding.Unicode.GetString(_data, startOffset + 66, FileNameLength * 2);
			}
		}