Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DataflowMessageHeader.cs
Go to the documentation of this file.
3
5
6[DebuggerDisplay("Id = {Id}")]
7public readonly struct DataflowMessageHeader : IEquatable<DataflowMessageHeader>
8{
9 private readonly long _id;
10
11 public bool IsValid => _id != 0;
12
13 public long Id => _id;
14
15 public DataflowMessageHeader(long id)
16 {
17 if (id == 0L)
18 {
20 }
21 _id = id;
22 }
23
25 {
26 return this == other;
27 }
28
29 public override bool Equals([NotNullWhen(true)] object? obj)
30 {
32 {
33 return this == (DataflowMessageHeader)obj;
34 }
35 return false;
36 }
37
38 public override int GetHashCode()
39 {
40 return (int)Id;
41 }
42
44 {
45 return left.Id == right.Id;
46 }
47
49 {
50 return left.Id != right.Id;
51 }
52}
static string Argument_InvalidMessageId
Definition SR.cs:26
Definition SR.cs:7
static bool operator!=(DataflowMessageHeader left, DataflowMessageHeader right)
static bool operator==(DataflowMessageHeader left, DataflowMessageHeader right)
override bool Equals([NotNullWhen(true)] object? obj)