Skip to content

Commit

Permalink
Remove GetHashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
ObiWanLansi committed Oct 11, 2021
1 parent f47fae7 commit 9dd597d
Show file tree
Hide file tree
Showing 22 changed files with 192 additions and 148 deletions.
19 changes: 16 additions & 3 deletions Documentation/Miscelleaous/ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ i write down the stuff in the fastest way, mostly in note form.

## ToDo

- ToTextTable: bool DeclaredOnly, PropertySortOrder.FromBaseDown / ToBaseUp
- Europe.Germany.RheinlandPfalz.Trier GAdm Generator
- DataSourceAttribute zu den entsprechenden Klassen
- ExampleAttribute weg
- Geometry Rectangle<T> where T: Kilometer, Millimeter or Meter
- IExample und dann in DoofesZeug.Generators ein Namespace Example, die Beispiele heißen dann immer XXXXXExample und implementieren
Examples, aus der TestConsole alles raus. IExample.Execute(TextWriter out).
- Dataset Generate Person:
- auch ein paar Enumerations leer lassen.
- Generate Full or All Features and Basic Features. Action<Person> manipulator.
- AssemblyStatisticsGenerator (Namespaces,Classes,Interfaces,Enums) Count, ReferencedAssemblies?
- Generate class overview for other classes which are not an entity.
- Entities: Genre, Artist, Album, Sampler, Movie, Book.
- MarkdownExtension
Expand All @@ -31,9 +42,6 @@ i write down the stuff in the fastest way, mostly in note form.
- Flatten JSON / XML ?
- Support für aufruf gnuplot für kleinere Diagramme zwischendurch ?
- MatheStuff, z.b geometrische Figuren Rectangle, Circle, und direkt mit ein paar Meßmethoden?
- Generic Singelton Pattern?
- Lazy Load Wrapper?
- Implement Observer Pattern in base class Entity?
- VCard support ?
- Kleiner einfacher Support für PlantUML?
- List<T> To DataTable
Expand All @@ -42,12 +50,17 @@ i write down the stuff in the fastest way, mostly in note form.
- CSV
- SQLite
- Markdown
- Geht sowas mittles Operatorenüberladung : DataTable["HalfWidth"] = DataTable["Width"] >> 1
- Countries (aus geonames generiert)
- Dienstgrade Feuerwehr, Polizei, Militär


## Done

- Remove all GetHashCode implementations.
- ~~Implement Observer Pattern in base class Entity?~~
- ~~Generic Singelton Pattern?~~
- ~~Lazy Load Wrapper?~~
- Entites for EMail, Homepage, Phone.
- GeoConvert für Lat, Lon und Alt.
- ~~StandardValidator als Attribute für EMail, Phone, Name, aber auch ein Interface Validate um komplexere zusammenhänge validieren zu können.~~
Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Datatypes/Misc/UnitPrefix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Name, this.Symbol, this.Factor);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Name, this.Symbol, this.Factor);
}
}
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/DateAndTime/Date.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,13 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Day, this.Month, this.Year);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Day, this.Month, this.Year);

//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/DateAndTime/Part/DateTimePart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => this.Value.GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => this.Value.GetHashCode();
}
}
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/DateAndTime/Time.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,13 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Hour, this.Minute, this.Second);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Hour, this.Minute, this.Second);

//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/DateAndTime/UnixTimestamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => this.lUnixTimestamp.GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => this.lUnixTimestamp.GetHashCode();


/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public abstract class Entity
/// </returns>
public override abstract bool Equals( object obj );

/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override abstract int GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override abstract int GetHashCode();


/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/IdentifiableEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public abstract class IdentifiableEntity : Entity
public override bool Equals( object obj ) => obj is IdentifiableEntity other && this.Id.Equals(other.Id) != false ;


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => this.Id.GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => this.Id.GetHashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public sealed class EMailAddress : IdentifiableEntity
public override string ToString() => this.Address;


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Address, this.InformationType);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Address, this.InformationType);


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public sealed class Homepage : IdentifiableEntity
public override string ToString() => this.Url.AbsoluteUri;


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Url, this.InformationType);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Url, this.InformationType);


/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/ManMade/Communication/Phone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public sealed class Phone : IdentifiableEntity
public override string ToString() => this.Number;


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Number, this.PhoneType, this.InformationType);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Number, this.PhoneType, this.InformationType);


/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/Science/Base/MetricValueBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => this.Value.GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => this.Value.GetHashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.MeterOverNN);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.MeterOverNN);


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ public GeoPoint2D( Latitude latitude, Longitude longitude)
public override bool Equals( object obj ) => Equals(this, obj as GeoPoint2D);


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Latitude, this.Longitude);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Latitude, this.Longitude);


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ public GeoPoint3D( Latitude latitude, Longitude longitude, Altitude altitude )
public override bool Equals( object obj ) => Equals(this, obj as GeoPoint3D);


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(this.Latitude, this.Longitude, this.Altitude);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(this.Latitude, this.Longitude, this.Altitude);


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => this.Value.GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => this.Value.GetHashCode();


/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ public override bool Equals( object obj )
}


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => this.Value.GetHashCode();
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => this.Value.GetHashCode();


/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions DoofesZeug.Library/Src/Entities/Specieses/Animals/Animal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ public class Animal : Species
public override bool Equals( object obj ) => Equals(this, obj as Animal);


/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), this.AnimalSpecies, this.Name);
///// <summary>
///// Returns a hash code for this instance.
///// </summary>
///// <returns>
///// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
///// </returns>
//public override int GetHashCode() => HashCode.Combine(base.GetHashCode(), this.AnimalSpecies, this.Name);


/// <summary>
Expand Down
Loading

0 comments on commit 9dd597d

Please sign in to comment.