Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (FileName != null ? FileName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FullPath != null ? FullPath.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ SizeInBytes.GetHashCode();
         hashCode = (hashCode * 397) ^ (Matches != null ? Matches.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public SqlDatabaseInfoModel(SqlDatabaseInfo info)
            : this()
        {
            Name           = info.Name;
            InstanceName   = info.InstanceName;
            IsSystemObject = info.IsSystemObject;
            if (!info.LastBackupDate.Equals(new DateTime()))
            {
                LastBackupDate = info.LastBackupDate;
            }

            SizeInBytes           = info.SizeInMB * 1024 * 1024;
            Size                  = SizeInBytes.ToPrettySize(2);
            SpaceAvailableInBytes = info.SpaceAvailableInKB * 1024;
            SpaceAvailable        = SpaceAvailableInBytes.ToPrettySize(2);
        }
Exemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hash = 17;
         // Suitable nullity checks etc, of course :)
         hash = hash * 23 + Width.GetHashCode();
         hash = hash * 23 + Height.GetHashCode();
         hash = hash * 23 + ColorCount.GetHashCode();
         hash = hash * 23 + ReservedByte.GetHashCode();
         hash = hash * 23 + Planes.GetHashCode();
         hash = hash * 23 + BitCount.GetHashCode();
         hash = hash * 23 + SizeInBytes.GetHashCode();
         hash = hash * 23 + FileOffset.GetHashCode();
         hash = hash * 23 + (SourceFileName == null ? 1 : SourceFileName.GetHashCode());
         hash = hash * 23 + SourceIndex.GetHashCode();
         return(hash);
     }
 }
 public bool Equals(OpenGLVertexInputElement other)
 {
     return(SizeInBytes.Equals(other.SizeInBytes) && ElementCount.Equals(other.ElementCount) &&
            Type == other.Type && Offset.Equals(other.Offset) && Normalized.Equals(other.Normalized) &&
            InstanceStepRate.Equals(other.InstanceStepRate));
 }
Exemplo n.º 5
0
 public override string ToString()
 {
     return(SizeInBytes.ToString());
 }