コード例 #1
0
        /// <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(AgencyPhone other)
        {
            if (other == null)
            {
                return(false);
            }

            var valuesEqual = Equals(_phone, other.Phone) &&
                              Equals(_agencyPhoneType, other.AgencyPhoneType);

            return(valuesEqual);
        }
コード例 #2
0
ファイル: AgencyAddressAndPhone.cs プロジェクト: girish66/REM
        /// <summary>
        /// Adds the phone.
        /// </summary>
        /// <param name="agencyPhone">
        /// The agency phone.
        /// </param>
        public virtual void AddPhone(AgencyPhone agencyPhone)
        {
            Check.IsNotNull(agencyPhone, "agencyPhone is required.");

            DomainRuleEngine.CreateRuleEngine <Agency, AgencyPhone> (Agency, () => AddPhone)
            .WithContext(agencyPhone)
            .WithContext(this)
            .Execute(() =>
            {
                agencyPhone.AgencyAddressAndPhone = this;
                _phoneNumbers.Add(agencyPhone);
                NotifyItemAdded(() => PhoneNumbers, agencyPhone);
            });
        }
コード例 #3
0
ファイル: AgencyPhone.cs プロジェクト: divyang4481/REM
        /// <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(AgencyPhone other)
        {
            if (other == null)
            {
                return false;
            }

            var valuesEqual = Equals(_phone, other.Phone)
                              && Equals(_agencyPhoneType, other.AgencyPhoneType);

            return valuesEqual;
        }
コード例 #4
0
ファイル: AgencyAddressAndPhone.cs プロジェクト: girish66/REM
 /// <summary>
 /// Removes the phone.
 /// </summary>
 /// <param name="agencyPhone">
 /// The agency phone.
 /// </param>
 public virtual void RemovePhone(AgencyPhone agencyPhone)
 {
     _phoneNumbers.Delete(agencyPhone);
     NotifyItemRemoved(() => PhoneNumbers, agencyPhone);
 }
コード例 #5
0
 /// <summary>
 /// Removes the phone.
 /// </summary>
 /// <param name="agencyPhone">
 /// The agency phone.
 /// </param>
 public virtual void RemovePhone(AgencyPhone agencyPhone)
 {
     _phoneNumbers.Delete(agencyPhone);
     NotifyItemRemoved(() => PhoneNumbers, agencyPhone);
 }
コード例 #6
0
        /// <summary>
        /// Adds the phone.
        /// </summary>
        /// <param name="agencyPhone">
        /// The agency phone.
        /// </param>
        public virtual void AddPhone(AgencyPhone agencyPhone)
        {
            Check.IsNotNull(agencyPhone, "agencyPhone is required.");

            DomainRuleEngine.CreateRuleEngine<Agency, AgencyPhone> ( Agency, () => AddPhone )
                .WithContext ( agencyPhone )
                .WithContext ( this )
                .Execute(() =>
                {
                    agencyPhone.AgencyAddressAndPhone = this;
                    _phoneNumbers.Add(agencyPhone);
                    NotifyItemAdded(() => PhoneNumbers, agencyPhone);
                });
        }