/// <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(AgencyIdentifier other) { if (other == null) { return(false); } var valuesEqual = Equals(_agencyIdentifierType, other.AgencyIdentifierType) && Equals(_identifierNumber, other.IdentifierNumber) && Equals(_effectiveDateRange, other.EffectiveDateRange); return(valuesEqual); }
/// <summary> /// Adds the identifier. /// </summary> /// <param name="agencyIdentifier"> /// The agency identifier. /// </param> public virtual void AddIdentifier(AgencyIdentifier agencyIdentifier) { Check.IsNotNull(agencyIdentifier, "agencyIdentifier is required."); DomainRuleEngine.CreateRuleEngine <Agency, AgencyIdentifier> (this, () => AddIdentifier) .WithContext(agencyIdentifier) .Execute(() => { agencyIdentifier.Agency = this; _agencyIdentifiers.Add(agencyIdentifier); NotifyItemAdded(() => AgencyIdentifiers, agencyIdentifier); }); }
/// <summary> /// Removes the identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void RemoveIdentifier( AgencyIdentifier identifier ) { _agencyIdentifiers.Delete(identifier); NotifyItemRemoved ( () => AgencyIdentifiers, identifier ); }
/// <summary> /// Adds the identifier. /// </summary> /// <param name="agencyIdentifier"> /// The agency identifier. /// </param> public virtual void AddIdentifier(AgencyIdentifier agencyIdentifier) { Check.IsNotNull ( agencyIdentifier, "agencyIdentifier is required." ); DomainRuleEngine.CreateRuleEngine<Agency, AgencyIdentifier> ( this, () => AddIdentifier ) .WithContext ( agencyIdentifier ) .Execute(() => { agencyIdentifier.Agency = this; _agencyIdentifiers.Add(agencyIdentifier); NotifyItemAdded(() => AgencyIdentifiers, agencyIdentifier); }); }
/// <summary> /// Removes the identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void RemoveIdentifier(AgencyIdentifier identifier) { _agencyIdentifiers.Delete(identifier); NotifyItemRemoved(() => AgencyIdentifiers, identifier); }
/// <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(AgencyIdentifier other) { if (other == null) { return false; } var valuesEqual = Equals(_agencyIdentifierType, other.AgencyIdentifierType) && Equals(_identifierNumber, other.IdentifierNumber) && Equals(_effectiveDateRange, other.EffectiveDateRange); return valuesEqual; }