/// <summary> /// Обновить состояние дб секции. /// </summary> /// <param name="newState"></param> public void UpdateState(DbSectionState newState) { if (CurrentDbSectionState.Equals(newState)) return; CurrentDbSectionState = newState; var handler = DbSectionStateChanged; if (handler != null) handler(this, new DbSectionStateEventArgs(newState)); }
private void RaiseAllStateChanged(DbSectionState newState) { foreach (var fullDbSectionInfo in _dbSections.Values) { fullDbSectionInfo.UpdateState(newState); } }
private void SetCanResolveInFalse() { foreach (var dbSection in _dbSections.Values) { var curState = dbSection.CurrentDbSectionState; var tempState = new DbSectionState(curState.DbState, curState.DbSectionStatus, curState.SectionVersion); dbSection.UpdateState(tempState); } }
public bool Equals(DbSectionState other) { return Equals(DbState, other.DbState) && DbSectionStatus.Equals(other.DbSectionStatus) && string.Equals(Message, other.Message) && CanResolve.Equals(other.CanResolve) && Equals(SectionVersion, other.SectionVersion); }
public DbSectionStateEventArgs(DbSectionState dbSectionState) { DbSectionState = dbSectionState; }
public CheckDbSchemaResult(DbSectionState dbState, Dictionary<Guid, ScoutVersion> secionsVersions) { DbState = dbState; SecionsVersions = secionsVersions; }