SIL.FieldWorks.XWorks.InterestingTextList.InvalidateRelatedSortSequences C# (CSharp) Method

InvalidateRelatedSortSequences() private method

private InvalidateRelatedSortSequences ( ) : void
return void
		private void InvalidateRelatedSortSequences()
		{
			if (Cache == null)
				return;

			// We won't keep track of the clerk between calls since it could change from time to time.
			var clerk = m_propertyTable.GetValue("ActiveClerk", null) as RecordClerk;
			if (clerk == null)
				return;

			if (!RelatedClerkIds.Contains(clerk.Id))
			{
				Debug.Fail("We may need to add a new RelatedClerkId.");
				return; // somehow we got in here with the wrong clerk?!
			}
			var otherRelatedClerkIds = GetRelatedClerkIds(clerk.Id);
			foreach (var clerkId in otherRelatedClerkIds)
			{
				RemoveSortSequenceFile(RecordView.GetSortFilePersistPathname(Cache, clerkId));
			}
		}