Class ContextModule
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
Represents a context module that can be used in an ICard.
public class ContextModule : IModule, IEquatable<ContextModule>, IEquatable<IModule>
- Inheritance
-
ContextModule
- Implements
- Inherited Members
- Extension Methods
Properties
Elements
Gets the elements in this context module.
public ImmutableArray<IElement> Elements { get; }
Property Value
- ImmutableArray<IElement>
An ImmutableArray<T> representing the elements in this context module.
Type
Gets the type of the module.
public ModuleType Type { get; }
Property Value
- ModuleType
A ModuleType value that represents the type of the module.
Methods
Equals(ContextModule?)
Determines whether the specified ContextModule is equal to the current ContextModule.
public bool Equals(ContextModule? contextModule)
Parameters
contextModule
ContextModuleThe ContextModule to compare with the current ContextModule.
Returns
- bool
true
if the specified ContextModule is equal to the current ContextModule; otherwise,false
.
Equals(object?)
Determines whether the specified ContextModule is equal to the current ContextModule.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current ContextModule.
Returns
- bool
true
if the specified ContextModule is equal to the current ContextModule; otherwise,false
.
Remarks
If the object passes is an ContextModule, Equals(ContextModule?) will be called to compare the 2 instances.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Operators
operator ==(ContextModule, ContextModule)
Determines whether the specified ContextModule is equal to the current ContextModule.
public static bool operator ==(ContextModule left, ContextModule right)
Parameters
left
ContextModuleright
ContextModule
Returns
- bool
true
if the specified ContextModule is equal to the current ContextModule; otherwise,false
.
operator !=(ContextModule, ContextModule)
Determines whether the specified ContextModule is not equal to the current ContextModule.
public static bool operator !=(ContextModule left, ContextModule right)
Parameters
left
ContextModuleright
ContextModule
Returns
- bool
true
if the specified ContextModule is not equal to the current ContextModule; otherwise,false
.