forked from jacobslusser/ScintillaNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarkerHandle.cs
More file actions
65 lines (59 loc) · 2.4 KB
/
MarkerHandle.cs
File metadata and controls
65 lines (59 loc) · 2.4 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ScintillaNET
{
/// <summary>
/// A <see cref="Marker" /> handle.
/// </summary>
/// <remarks>
/// This is an opaque type, meaning it can be used by a <see cref="Scintilla" /> control but
/// otherwise has no public members of its own.
/// </remarks>
public struct MarkerHandle
{
internal IntPtr Value;
/// <summary>
/// A read-only field that represents an uninitialized handle.
/// </summary>
public static readonly MarkerHandle Zero;
/// <summary>
/// Returns a value indicating whether this instance is equal to a specified object.
/// </summary>
/// <param name="obj">An object to compare with this instance or null.</param>
/// <returns>true if <paramref name="obj" /> is an instance of <see cref="MarkerHandle" /> and equals the value of this instance; otherwise, false.</returns>
public override bool Equals(object obj)
{
return (obj is IntPtr) && Value == ((MarkerHandle)obj).Value;
}
/// <summary>
/// Returns the hash code for this instance.
/// </summary>
/// <returns>A 32-bit signed integer hash code.</returns>
public override int GetHashCode()
{
return Value.GetHashCode();
}
/// <summary>
/// Determines whether two specified instances of <see cref="MarkerHandle" /> are equal.
/// </summary>
/// <param name="a">The first handle to compare.</param>
/// <param name="b">The second handle to compare.</param>
/// <returns>true if <paramref name="a" /> equals <paramref name="b" />; otherwise, false.</returns>
public static bool operator ==(MarkerHandle a, MarkerHandle b)
{
return a.Value == b.Value;
}
/// <summary>
/// Determines whether two specified instances of <see cref="MarkerHandle" /> are not equal.
/// </summary>
/// <param name="a">The first handle to compare.</param>
/// <param name="b">The second handle to compare.</param>
/// <returns>true if <paramref name="a" /> does not equal <paramref name="b" />; otherwise, false.</returns>
public static bool operator !=(MarkerHandle a, MarkerHandle b)
{
return a.Value != b.Value;
}
}
}