rama creada apartir de master en j
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
namespace adas_core.Domain.Models.GroupedObservations;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a field, typically used to encapsulate data or a value within a larger structure or system.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// As a public class, it is accessible from any other code that can reference its containing namespace or assembly.
|
||||
/// </remarks>
|
||||
public class Field
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
namespace adas_core.Domain.Models.GroupedObservations;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a field that belongs to a logical grouping, encapsulating the concept of a field within a grouped structure.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This type is intended to model fields that are organized together as part of a group, allowing related field metadata or behavior to be handled collectively.
|
||||
/// </remarks>
|
||||
public class GroupedField
|
||||
{
|
||||
public GroupedField()
|
||||
@@ -48,18 +54,33 @@ public class GroupedField
|
||||
|
||||
public List<string>? LabelList { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the list of names stored in the current instance.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="List{String}"/> containing the names; returns the underlying field directly without copying or filtering.</returns>
|
||||
public List<string> GetNames()
|
||||
{
|
||||
return Names;
|
||||
}
|
||||
{
|
||||
return Names;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified object is equal to the current <see cref="GroupedField"/> by comparing their <c>Group</c> property values.
|
||||
/// Returns <c>true</c> only when <paramref name="obj"/> is a <see cref="GroupedField"/> instance with a matching <c>Group</c>; otherwise returns <c>false</c> (including for <c>null</c> or non-matching types).
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to compare with the current instance.</param>
|
||||
/// <returns><c>true</c> if the specified object is a <see cref="GroupedField"/> with the same <c>Group</c>; otherwise, <c>false</c>.</returns>
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is GroupedField field && Group == field.Group;
|
||||
}
|
||||
{
|
||||
return obj is GroupedField field && Group == field.Group;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes a hash code for the current instance by combining the values of its key properties: Name, Group, Max, Regularity, and Result.
|
||||
/// This override ensures consistent hash-based behavior for equality comparisons and use in hash-based collections.
|
||||
/// </summary>
|
||||
/// <returns>An integer hash code derived from the object's key properties.</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(Name, Group, Max, Regularity, Result);
|
||||
}
|
||||
{
|
||||
return HashCode.Combine(Name, Group, Max, Regularity, Result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user