- Timestamp:
- 04/16/09 12:40:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Core/FormatBase.cs
r1556 r1564 3 3 namespace HeuristicLab.Persistence.Interfaces { 4 4 5 public abstract class FormatBase : IFormat { 6 public abstract string Name { get; } 5 public abstract class FormatBase<SerialDataFormat> : IFormat<SerialDataFormat> where SerialDataFormat : ISerialData { 6 7 public abstract string Name { get; } 8 9 public Type SerialDataType { get { return typeof(SerialDataFormat); } } 10 11 public bool Equals(FormatBase<SerialDataFormat> f) { 12 if (f == null) 13 return false; 14 return f.Name == this.Name; 15 } 16 7 17 public override bool Equals(object obj) { 8 if (obj as IFormat == null) 9 return false; 10 return this.Equals((FormatBase)obj); 18 FormatBase<SerialDataFormat> f = obj as FormatBase<SerialDataFormat>; 19 return Equals(f); 11 20 } 12 public bool Equals(FormatBase f) { 13 return Name.Equals(f.Name); 14 } 15 public override int GetHashCode() { 16 return Name.GetHashCode(); 17 } 21 18 22 } 23 19 24 }
Note: See TracChangeset
for help on using the changeset viewer.