Ejemplo n.º 1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>A hash code for the current <see cref="T:System.Object"/>.</returns>
 public override int GetHashCode()
 {
     return(BootCritical.GetHashCode()
            ^ InBox.GetHashCode()
            ^ (String.IsNullOrEmpty(CatalogFile) ? 0 : CatalogFile.GetHashCode())
            ^ (String.IsNullOrEmpty(ClassDescription) ? 0 : ClassDescription.GetHashCode())
            ^ (String.IsNullOrEmpty(ClassGuid) ? 0 : ClassGuid.GetHashCode())
            ^ (String.IsNullOrEmpty(ClassName) ? 0 : ClassName.GetHashCode())
            ^ Date.GetHashCode()
            ^ DriverSignature.GetHashCode()
            ^ (String.IsNullOrEmpty(OriginalFileName) ? 0 : OriginalFileName.GetHashCode())
            ^ (String.IsNullOrEmpty(ProviderName) ? 0 : ProviderName.GetHashCode())
            ^ (String.IsNullOrEmpty(PublishedName) ? 0 : PublishedName.GetHashCode()));
 }
Ejemplo n.º 2
0
 public WindowsDriverPackage(DismDriverPackage pkg)
 {
     this._publishedName    = pkg.PublishedName;
     this._originalFileName = pkg.OriginalFileName;
     this._isInnBox         = pkg.InBox;
     this._catalogFile      = pkg.CatalogFile;
     this._className        = pkg.ClassName;
     this._classGuid        = Guid.Parse(pkg.ClassGuid);
     this._classDescription = pkg.ClassDescription;
     this._isBootCritical   = pkg.BootCritical;
     this._driverSignature  = pkg.DriverSignature;
     this._providerName     = pkg.ProviderName;
     this._date             = pkg.Date.ToDateTime();
     this._version          = new Version(
         (int)pkg.MajorVersion,
         (int)pkg.MinorVersion,
         (int)pkg.Build,
         (int)pkg.Revision
         );
 }