public bool IsSourceStateChangeAllowed(MediaSyncSourceState newState, MediaSyncSourceState oldState) { if (this.syncStarting) { return(false); } switch (newState) { case MediaSyncSourceState.Loading: return(((this.CurrentState == PartnershipState.Uninitialized) || (this.CurrentState == PartnershipState.Idle)) || (this.CurrentState == PartnershipState.LoadingSources)); case MediaSyncSourceState.Verifying: return(((this.CurrentState == PartnershipState.Idle) || (this.CurrentState == PartnershipState.ApplyingRules)) || (this.CurrentState == PartnershipState.VerifyingSources)); case MediaSyncSourceState.RespondingToChanges: if ((this.CurrentState != PartnershipState.Idle) || !this.MusicAndMovieProvider.IsVerified) { return(false); } return(this.PhotoAndVideoProvider.IsVerified); } return(true); }
public bool IsSourceStateChangeAllowed(MediaSyncSourceState newState, MediaSyncSourceState oldState) { if (this.syncStarting) { return false; } switch (newState) { case MediaSyncSourceState.Loading: return (((this.CurrentState == PartnershipState.Uninitialized) || (this.CurrentState == PartnershipState.Idle)) || (this.CurrentState == PartnershipState.LoadingSources)); case MediaSyncSourceState.Verifying: return (((this.CurrentState == PartnershipState.Idle) || (this.CurrentState == PartnershipState.ApplyingRules)) || (this.CurrentState == PartnershipState.VerifyingSources)); case MediaSyncSourceState.RespondingToChanges: if ((this.CurrentState != PartnershipState.Idle) || !this.MusicAndMovieProvider.IsVerified) { return false; } return this.PhotoAndVideoProvider.IsVerified; } return true; }