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

UpdateConcordanceForMorphemes() private method

Concordance contains all occurrences of analyses which contain exactly the specified morpheme. A match may be either on the Form of the morph bundle, or on the form of the MoForm it points to.
private UpdateConcordanceForMorphemes ( int ws ) : List
ws int
return List
		private List<IParaFragment> UpdateConcordanceForMorphemes(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(mb.MorphRA.Form.get_String(ws))
					|| matcher.Matches(mb.Form.get_String(ws)))
				{
					analyses.Add(mb.Owner as IWfiAnalysis);
				}
			}
			return GetOccurrencesOfAnalyses(analyses);
		}