This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 265
/
PlotCompositionChange.cs
69 lines (61 loc) · 2.97 KB
/
PlotCompositionChange.cs
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
66
67
68
// Copyright (c) Microsoft Corporation. All Rights Reserved.
// Licensed under the MIT License.
namespace InteractiveDataDisplay.WPF
{
/// <summary>Identifies event when collection of related plots in composition change</summary>
public struct PlotCompositionChange
{
private PlotBase master;
/// <summary>
/// Initializes a new instance of <see cref="PlotCompositionChange"/>
/// </summary>
/// <param name="master">Master <see cref="PlotBase"/> of composition that change</param>
public PlotCompositionChange(PlotBase master)
{
this.master = master;
}
/// <summary>Gets master plot of composition that change</summary>
public PlotBase Master
{
get { return master; }
}
/// <summary>
/// Determines whether the specified <see cref="PlotCompositionChange"/> is equal to the current <see cref="PlotCompositionChange"/>.
/// </summary>
/// <param name="obj">The <see cref="PlotCompositionChange"/> to compare with the current <see cref="PlotCompositionChange"/>.</param>
/// <returns>True if the specified <see cref="PlotCompositionChange"/> is equal to the current <see cref="PlotCompositionChange"/>, false otherwise.</returns>
public override bool Equals(object obj)
{
PlotCompositionChange operand = (PlotCompositionChange)obj;
return master == operand.master;
}
/// <summary>
/// Returns a value that indicates whether two specified <see cref="PlotCompositionChange"/> values are equal.
/// </summary>
/// <param name="plotCompositionChange1">The first value to compare.</param>
/// <param name="plotCompositionChange2">The second value to compare.</param>
/// <returns>True if values are equal, false otherwise.</returns>
public static bool operator ==(PlotCompositionChange plotCompositionChange1, PlotCompositionChange plotCompositionChange2)
{
return plotCompositionChange1.Equals(plotCompositionChange2);
}
/// <summary>
/// Returns a value that indicates whether two specified <see cref="PlotCompositionChange"/> values are not equal.
/// </summary>
/// <param name="plotCompositionChange1">The first value to compare.</param>
/// <param name="plotCompositionChange2">The second value to compare.</param>
/// <returns>True if values are not equal, false otherwise.</returns>
public static bool operator !=(PlotCompositionChange plotCompositionChange1, PlotCompositionChange plotCompositionChange2)
{
return !plotCompositionChange1.Equals(plotCompositionChange2);
}
/// <summary>
/// Returns the hash code for this instance.
/// </summary>
/// <returns>The hash code for current instance</returns>
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}