=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
/// <remarks>
|
||||
/// Implements <see cref="IEquatable{T}"/> of <see cref="HistoricalLocation"/> to allow instances to be compared for value equality without relying on object identity.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=a0e1a1a -->
|
||||
public class HistoricalLocation : IEquatable<HistoricalLocation>
|
||||
{
|
||||
// Propiedades con get y set para que MongoDB pueda escribir en ellas
|
||||
@@ -16,6 +17,7 @@ public class HistoricalLocation : IEquatable<HistoricalLocation>
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HistoricalLocation"/> class, which represents a historical record of a location.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=f80bd9e body=4448e1d -->
|
||||
public HistoricalLocation() { }
|
||||
|
||||
// Tu constructor actual
|
||||
@@ -38,6 +40,7 @@ public class HistoricalLocation : IEquatable<HistoricalLocation>
|
||||
/// </summary>
|
||||
/// <param name="other">The other <see cref="HistoricalLocation"/> instance to compare with this one.</param>
|
||||
/// <returns><c>true</c> if both the admission time and patient location match; otherwise, <c>false</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=0ff3ea9 body=152b210 -->
|
||||
public bool Equals(HistoricalLocation? other)
|
||||
{
|
||||
if (other == null) return false;
|
||||
@@ -49,17 +52,20 @@ public class HistoricalLocation : IEquatable<HistoricalLocation>
|
||||
/// Determines whether this instance is considered empty by verifying that no admission time is set and that the patient location is either null or empty.
|
||||
/// </summary>
|
||||
/// <returns><see langword="true"/> when <c>AdmTime</c> has no value and <c>PatientLocation</c> is <see langword="null"/> or empty; otherwise, <see langword="false"/>.</returns>
|
||||
/// <!-- aidoc:v1 sig=4cc0edf -->
|
||||
public bool IsEmpty() => !AdmTime.HasValue && (PatientLocation == null || PatientLocation.IsEmpty());
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the instance is in a full state by verifying that an admission time has been set, a patient location is assigned, and the assigned location is not full or empty.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> when <see cref="AdmTime"/> has a value, <see cref="PatientLocation"/> is not null, and the location is not full or empty; otherwise, <c>false</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=dbff41a -->
|
||||
public bool IsFull() => AdmTime.HasValue && PatientLocation != null && !PatientLocation.IsFullEmpty();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a string representation of the HistoricalLocation, including the admission time and patient location.
|
||||
/// </summary>
|
||||
/// <returns>A formatted string with the values of <c>AdmTime</c> and <c>PatientLocation</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=cdf9f2a -->
|
||||
public override string ToString() => $"HistoricalLocation[AdmTime: {AdmTime}, PatientLocation: {PatientLocation}]";
|
||||
}
|
||||
Reference in New Issue
Block a user