External/OxyPlot/OxyPlot.WindowsForms/HashSet.cs
changeset 392 4b43228a9894
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/External/OxyPlot/OxyPlot.WindowsForms/HashSet.cs	Sat Jun 08 17:06:00 2013 +0000
     1.3 @@ -0,0 +1,27 @@
     1.4 +
     1.5 +namespace OxyPlot.WindowsForms {
     1.6 +  using System;
     1.7 +  using System.Collections.Generic;
     1.8 +  using System.Text;
     1.9 +
    1.10 +  public class HashSet<T> {
    1.11 +
    1.12 +    private readonly Dictionary<T, object> set = new Dictionary<T, object>();
    1.13 +
    1.14 +    public bool Add(T value) {
    1.15 +      if (set.ContainsKey(value))
    1.16 +        return true;
    1.17 +
    1.18 +      set.Add(value, null);
    1.19 +      return false;
    1.20 +    }
    1.21 +
    1.22 +    public bool Contains(T value) {
    1.23 +      return set.ContainsKey(value);
    1.24 +    }
    1.25 +
    1.26 +    public void Clear() {
    1.27 +      set.Clear();
    1.28 +    }
    1.29 +  }
    1.30 +}