/// <summary> /// Create a new CAB Update object with /// only basic information. /// </summary> /// <param name="filePath">CAB file path.</param> public CabUpdate(string filePath) : base(filePath) { if (!File.Exists(Location)) { throw new FileNotFoundException(); } if (!Location.EndsWithIgnoreCase(".CAB")) { throw new InvalidOperationException("This is not a cab file."); } switch (_updateType) { case UpdateType.LDR: _image = "/Images/_Global/CabUpdateLDR_32.png"; break; case UpdateType.GDR: _image = "/Images/_Global/CabUpdateGDR_32.png"; break; default: _image = "/Images/_Global/CabUpdate_32.png"; break; } if (!string.IsNullOrWhiteSpace(_packageName)) { return; } GetDetails(); if (PackageName.StartsWithIgnoreCase("WUClient-SelfUpdate-")) { _packageDescription = PackageName; } }