2023-05-23 20:28:19 -05:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.Iris.Debug;
|
|
|
|
|
|
|
|
|
|
public struct Breakpoint : IEquatable<Breakpoint>
|
|
|
|
|
{
|
2023-05-24 16:04:47 -05:00
|
|
|
public Breakpoint(string uri, int line, int column, bool enabled = true)
|
2023-05-23 20:28:19 -05:00
|
|
|
{
|
|
|
|
|
Uri = uri;
|
|
|
|
|
Line = line;
|
|
|
|
|
Column = column;
|
2023-05-24 16:04:47 -05:00
|
|
|
Enabled = enabled;
|
2023-05-23 20:28:19 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Uri { get; set; }
|
|
|
|
|
|
|
|
|
|
public int Line { get; set; }
|
|
|
|
|
|
|
|
|
|
public int Column { get; set; }
|
|
|
|
|
|
2023-05-24 16:04:47 -05:00
|
|
|
public bool Enabled { get; set; }
|
|
|
|
|
|
2023-05-23 20:28:19 -05:00
|
|
|
public bool Equals(string uri, int line, int column) => uri == Uri && line == Line && column == Column;
|
|
|
|
|
|
|
|
|
|
public bool Equals(Breakpoint other) => Equals(other.Uri, other.Line, other.Column);
|
|
|
|
|
|
|
|
|
|
public static bool operator ==(Breakpoint left, Breakpoint right) => left.Equals(right);
|
|
|
|
|
|
|
|
|
|
public static bool operator !=(Breakpoint left, Breakpoint right) => !(left == right);
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj) => obj is Breakpoint bp && Equals(bp);
|
|
|
|
|
}
|