rama creada apartir de master en j

This commit is contained in:
jrojas
2026-06-26 10:29:23 +02:00
parent 319fd3dfb0
commit c1517fda87
2810 changed files with 1927392 additions and 25392 deletions
+23 -8
View File
@@ -4,6 +4,12 @@ using Newtonsoft.Json;
namespace adas_core.Domain.Models.MongoModels;
/// <summary>
/// Represents a relay class that provides functionality for forwarding or passing through data, commands, or notifications between components.
/// </summary>
/// <remarks>
/// This class serves as an intermediary mechanism, commonly used to decouple producers and consumers of information.
/// </remarks>
public class Relay
{
public ObjectId Id { get; set; }
@@ -41,15 +47,24 @@ public class Relay
public RelayEnum.Status? ManualRelayStatus { get; set; }
/// <summary>
/// Determines whether the current <see cref="Relay"/> instance is equal to another <see cref="Relay"/> by comparing all of their properties (Driver, Ip, Port, RelayNumber, RelayName, Total, Username, and Password).
/// </summary>
/// <param name="other">The other <see cref="Relay"/> instance to compare against the current one.</param>
/// <returns><c>true</c> if all properties of both relays match; otherwise, <c>false</c>.</returns>
public bool Equals(Relay other)
{
return Driver == other.Driver && Ip == other.Ip && Port == other.Port && RelayNumber == other.RelayNumber &&
RelayName == other.RelayName && Total == other.Total && Username == other.Username &&
Password == other.Password;
}
{
return Driver == other.Driver && Ip == other.Ip && Port == other.Port && RelayNumber == other.RelayNumber &&
RelayName == other.RelayName && Total == other.Total && Username == other.Username &&
Password == other.Password;
}
/// <summary>
/// Returns a JSON string representation of the current object, serializing all its public properties via JsonConvert.
/// </summary>
/// <returns>A JSON-formatted string that represents the current object.</returns>
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
{
return JsonConvert.SerializeObject(this);
}
}