コード例 #1
0
ファイル: LocationIdentifier.cs プロジェクト: girish66/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(LocationIdentifier other)
        {
            if (other == null)
            {
                return(false);
            }

            var valuesEqual = Equals(_locationIdentifierType, other.LocationIdentifierType) && Equals(_identifierNumber, other.IdentifierNumber) &&
                              Equals(_effectiveDateRange, other.EffectiveDateRange);

            return(valuesEqual);
        }
コード例 #2
0
        /// <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);
            });
        }
コード例 #3
0
ファイル: LocationIdentifier.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(LocationIdentifier other)
        {
            if (other == null)
            {
                return false;
            }

            var valuesEqual = Equals(_locationIdentifierType, other.LocationIdentifierType) && Equals(_identifierNumber, other.IdentifierNumber)
                              && Equals(_effectiveDateRange, other.EffectiveDateRange);

            return valuesEqual;
        }
コード例 #4
0
ファイル: Location.cs プロジェクト: divyang4481/REM
 /// <summary>
 /// The remove identifier.
 /// </summary>
 /// <param name="identifier">
 /// The identifier.
 /// </param>
 public virtual void RemoveIdentifier(LocationIdentifier identifier)
 {
     _locationIdentifiers.Delete(identifier);
     NotifyItemRemoved(() => LocationIdentifiers, identifier);
 }
コード例 #5
0
ファイル: Location.cs プロジェクト: divyang4481/REM
        /// <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);
                });
        }
コード例 #6
0
 /// <summary>
 /// The remove identifier.
 /// </summary>
 /// <param name="identifier">
 /// The identifier.
 /// </param>
 public virtual void RemoveIdentifier(LocationIdentifier identifier)
 {
     _locationIdentifiers.Delete(identifier);
     NotifyItemRemoved(() => LocationIdentifiers, identifier);
 }