forked from judero01col/GMap.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadTask.cs
More file actions
50 lines (41 loc) · 1.05 KB
/
Copy pathLoadTask.cs
File metadata and controls
50 lines (41 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
namespace GMap.NET.Internals
{
/// <summary>
/// tile load task
/// </summary>
internal struct LoadTask : IEquatable<LoadTask>
{
public GPoint Pos;
public int Zoom;
internal Core Core;
public LoadTask(GPoint pos, int zoom, Core core = null)
{
Pos = pos;
Zoom = zoom;
Core = core;
}
public override string ToString()
{
return Zoom + " - " + Pos.ToString();
}
#region IEquatable<LoadTask> Members
public bool Equals(LoadTask other)
{
return Zoom == other.Zoom && Pos == other.Pos;
}
#endregion
}
internal class LoadTaskComparer : IEqualityComparer<LoadTask>
{
public bool Equals(LoadTask x, LoadTask y)
{
return x.Zoom == y.Zoom && x.Pos == y.Pos;
}
public int GetHashCode(LoadTask obj)
{
return obj.Zoom ^ obj.Pos.GetHashCode();
}
}
}