Fauna v10 .NET/C# Driver 0.2.0-beta
 
Loading...
Searching...
No Matches
Module.cs
Go to the documentation of this file.
1namespace Fauna.Types;
2
7public sealed class Module : IEquatable<Module>
8{
12 public string Name { get; }
13
18 public Module(string name)
19 {
20 Name = name;
21 }
22
28 public bool Equals(Module? other)
29 {
30 if (ReferenceEquals(null, other)) return false;
31 if (ReferenceEquals(this, other)) return true;
32 return Name == other.Name;
33 }
34
40 public override bool Equals(object? obj)
41 {
42 if (ReferenceEquals(null, obj)) return false;
43 if (ReferenceEquals(this, obj)) return true;
44 if (obj.GetType() != GetType()) return false;
45 return Equals((Module)obj);
46 }
47
52 public override int GetHashCode()
53 {
54 return Name.GetHashCode();
55 }
56}
Represents a module, a singleton object grouping related functionalities. Modules are serialized as @...
Definition Module.cs:8
override int GetHashCode()
The default hash function.
Definition Module.cs:52
bool Equals(Module? other)
Determines whether the specified Module is equal to the current Module.
Definition Module.cs:28
string Name
Gets the name of the module. The name is used to identify and reference the module.
Definition Module.cs:12
override bool Equals(object? obj)
Determines whether the specified object is equal to the current Module.
Definition Module.cs:40
Module(string name)
Initializes a new instance of the Module class with the specified name.
Definition Module.cs:18