SIL.FieldWorks.IText.ConcordanceControl.UpdateConcordanceForLexEntry C# (CSharp) Method

UpdateConcordanceForLexEntry() private method

Concordance contains all occurrences of analyses which contain the specified lex entry, in the sense that they point to an MoForm whose owner's LexemeForm matches the pattern. Enhance JohnT: the VC will show the citation form, in the (unlikely? impossible?) event that the LexemeForm doesn't have a form. Should we search there too?
private UpdateConcordanceForLexEntry ( int ws ) : List
ws int
return List
		private List<IParaFragment> UpdateConcordanceForLexEntry(int ws)
		{
			// Find analyses that have the relevant morpheme.
			var analyses = new HashSet<IAnalysis>();
			var matcher = GetMatcher(ws);
			foreach (var mb in m_cache.ServiceLocator.GetInstance<IWfiMorphBundleRepository>().AllInstances())
			{
				if (mb.MorphRA != null && matcher.Matches(((ILexEntry)mb.MorphRA.Owner).LexemeFormOA.Form.get_String(ws)))
				{
					analyses.Add(mb.Owner as IWfiAnalysis);
				}
			}
			return GetOccurrencesOfAnalyses(analyses);
		}