/// <summary> /// Add identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void AddIdentifier(StaffIdentifier identifier) { Check.IsNotNull(identifier, "Identifier is required."); DomainRuleEngine.CreateRuleEngine <Staff, StaffIdentifier> (this, () => AddIdentifier) .WithContext(identifier) .Execute(() => { identifier.Staff = this; _identifiers.Add(identifier); NotifyItemAdded(() => Identifiers, identifier); }); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="staffIdentifier"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(StaffIdentifier staffIdentifier) { if (staffIdentifier == null) { return(false); } var valuesEqual = Equals(_staffIdentifierType.Key, staffIdentifier._staffIdentifierType.Key) && Equals(_identifierNumber, staffIdentifier._identifierNumber) && Equals(_effectiveDateRange, staffIdentifier._effectiveDateRange); return(valuesEqual); }
/// <summary> /// Remove identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void RemoveIdentifier( StaffIdentifier identifier ) { Check.IsNotNull ( identifier, "Identifier is required." ); _identifiers.Remove ( identifier ); NotifyItemRemoved ( () => Identifiers, identifier ); }
/// <summary> /// Add identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void AddIdentifier( StaffIdentifier identifier ) { Check.IsNotNull ( identifier, "Identifier is required." ); DomainRuleEngine.CreateRuleEngine<Staff, StaffIdentifier> ( this, () => AddIdentifier ) .WithContext ( identifier ) .Execute(() => { identifier.Staff = this; _identifiers.Add(identifier); NotifyItemAdded(() => Identifiers, identifier); }); }
/// <summary> /// Determines if the values are equal. /// </summary> /// <param name="staffIdentifier"> /// The other object. /// </param> /// <returns> /// A boolean denoting equality of the values. /// </returns> public virtual bool ValuesEqual(StaffIdentifier staffIdentifier) { if (staffIdentifier == null) { return false; } var valuesEqual = Equals ( _staffIdentifierType.Key, staffIdentifier._staffIdentifierType.Key ) && Equals ( _identifierNumber, staffIdentifier._identifierNumber ) && Equals ( _effectiveDateRange, staffIdentifier._effectiveDateRange ); return valuesEqual; }
/// <summary> /// Remove identifier. /// </summary> /// <param name="identifier"> /// The identifier. /// </param> public virtual void RemoveIdentifier(StaffIdentifier identifier) { Check.IsNotNull(identifier, "Identifier is required."); _identifiers.Remove(identifier); NotifyItemRemoved(() => Identifiers, identifier); }