Fauna v10 .NET/C# Driver 0.2.0-beta
 
Loading...
Searching...
No Matches
Stream.cs
Go to the documentation of this file.
1namespace Fauna.Types;
2
6public sealed class Stream : IEquatable<Stream>
7{
8 public Stream(string token)
9 {
10 Token = token;
11 }
12
16 public string Token { get; }
17
23 public bool Equals(Stream? other)
24 {
25 if (ReferenceEquals(null, other)) return false;
26 if (ReferenceEquals(this, other)) return true;
27 return Token == other.Token;
28 }
29
35 public override bool Equals(object? obj)
36 {
37 if (ReferenceEquals(null, obj)) return false;
38 if (ReferenceEquals(this, obj)) return true;
39 if (obj.GetType() != GetType()) return false;
40 return Equals((Stream)obj);
41 }
42
47 public override int GetHashCode()
48 {
49 return Token.GetHashCode();
50 }
51}
Represents a Fauna stream token.
Definition Stream.cs:7
Stream(string token)
Definition Stream.cs:8
string Token
Gets the string value of the stream token.
Definition Stream.cs:16
override int GetHashCode()
The default hash function.
Definition Stream.cs:47
bool Equals(Stream? other)
Determines whether the specified Stream is equal to the current Stream.
Definition Stream.cs:23
override bool Equals(object? obj)
Determines whether the specified object is equal to the current Stream.
Definition Stream.cs:35