Changeset 2790 for trunk/sources/HeuristicLab.Core/3.3/ChangedEventArgs.cs
- Timestamp:
- 02/13/10 04:37:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/ChangedEventArgs.cs
r2653 r2790 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-20 08Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using System.Collections.Generic; 24 24 using System.Text; 25 using HeuristicLab.Common; 25 26 26 27 namespace HeuristicLab.Core { … … 28 29 29 30 public class ChangedEventArgs : EventArgs { 30 private class ReferenceEqualityComparer : IEqualityComparer<object> {31 bool IEqualityComparer<object>.Equals(object x, object y) {32 return object.ReferenceEquals(x, y);33 }34 35 int IEqualityComparer<object>.GetHashCode(object obj) {36 if (obj == null) return 0;37 return obj.GetHashCode();38 }39 }40 41 31 private HashSet<object> changedObjects; 42 32 43 33 public ChangedEventArgs() { 44 changedObjects = new HashSet<object>(new ReferenceEqualityComparer()); 34 changedObjects = new HashSet<object>(new ReferenceEqualityComparer<object>()); 35 } 36 public ChangedEventArgs(IEnumerable<object> collection) { 37 changedObjects = new HashSet<object>(collection, new ReferenceEqualityComparer<object>()); 45 38 } 46 39
Note: See TracChangeset
for help on using the changeset viewer.