/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="other"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(LocationIdentifier other) { if (other == null) { return(false); } var valuesEqual = Equals(_locationIdentifierType, other.LocationIdentifierType) && Equals(_identifierNumber, other.IdentifierNumber) && Equals(_effectiveDateRange, other.EffectiveDateRange); return(valuesEqual); }
/// <summary> /// The add identifier. /// </summary> /// <param name="locationIdentifier"> /// The location identifier. /// </param> public virtual void AddIdentifier(LocationIdentifier locationIdentifier) { Check.IsNotNull(locationIdentifier, "locationIdentifier is required."); DomainRuleEngine.CreateRuleEngine <Location, LocationIdentifier> (this, () => AddIdentifier) .WithContext(locationIdentifier) .Execute(() => { locationIdentifier.Location = this; _locationIdentifiers.Add(locationIdentifier); NotifyItemAdded(() => LocationIdentifiers, locationIdentifier); }); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="other"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(LocationIdentifier other) { if (other == null) { return false; } var valuesEqual = Equals(_locationIdentifierType, other.LocationIdentifierType) && Equals(_identifierNumber, other.IdentifierNumber) && Equals(_effectiveDateRange, other.EffectiveDateRange); return valuesEqual; }
/// <summary> /// The remove identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void RemoveIdentifier(LocationIdentifier identifier) { _locationIdentifiers.Delete(identifier); NotifyItemRemoved(() => LocationIdentifiers, identifier); }
/// <summary> /// The add identifier. /// </summary> /// <param name="locationIdentifier"> /// The location identifier. /// </param> public virtual void AddIdentifier(LocationIdentifier locationIdentifier) { Check.IsNotNull(locationIdentifier, "locationIdentifier is required."); DomainRuleEngine.CreateRuleEngine<Location, LocationIdentifier> ( this, () => AddIdentifier ) .WithContext ( locationIdentifier ) .Execute(() => { locationIdentifier.Location = this; _locationIdentifiers.Add(locationIdentifier); NotifyItemAdded(() => LocationIdentifiers, locationIdentifier); }); }