예제 #1
0
파일: Airport.cs 프로젝트: felixthehat/Limo
     public bool Equals(Airport other)
     {
         if (ReferenceEquals(null, other)) return false;
         if (ReferenceEquals(this, other)) return true;
 		if (other.Id == 0 && Id == 0)
 			return false;
 		else
 			return other.Id == Id;
     }
예제 #2
0
     private void FixupAirport(Airport previousValue, bool skipKeys = false)
     {
         if (IsDeserializing)
         {
             return;
         }
 
         if (Airport != null)
         {
             AirportId = Airport.Id;
         }
 
         else if (!skipKeys)
         {
             AirportId = null;
         }
 
         if (ChangeTracker.ChangeTrackingEnabled)
         {
             if (ChangeTracker.OriginalValues.ContainsKey("Airport")
                 && (ChangeTracker.OriginalValues["Airport"] == Airport))
             {
                 ChangeTracker.OriginalValues.Remove("Airport");
             }
             else
             {
                 ChangeTracker.RecordOriginalValue("Airport", previousValue);
             }
             if (Airport != null && !Airport.ChangeTracker.ChangeTrackingEnabled)
             {
                 Airport.StartTracking();
             }
         }
     }
예제 #3
0
     private void FixupAirport(Airport previousValue)
     {
         if (IsDeserializing)
         {
             return;
         }
 
         if (previousValue != null && previousValue.MeetingPoints.Contains(this))
         {
             previousValue.MeetingPoints.Remove(this);
         }
 
         if (Airport != null)
         {
             if (!Airport.MeetingPoints.Contains(this))
             {
                 Airport.MeetingPoints.Add(this);
             }
 
             AirportId = Airport.Id;
         }
         if (ChangeTracker.ChangeTrackingEnabled)
         {
             if (ChangeTracker.OriginalValues.ContainsKey("Airport")
                 && (ChangeTracker.OriginalValues["Airport"] == Airport))
             {
                 ChangeTracker.OriginalValues.Remove("Airport");
             }
             else
             {
                 ChangeTracker.RecordOriginalValue("Airport", previousValue);
             }
             if (Airport != null && !Airport.ChangeTracker.ChangeTrackingEnabled)
             {
                 Airport.StartTracking();
             }
         }
     }