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

GetParaFragmentsOfTags() private method

private GetParaFragmentsOfTags ( IEnumerable matchedTags ) : List
matchedTags IEnumerable
return List
		private List<IParaFragment> GetParaFragmentsOfTags(IEnumerable<ITextTag> matchedTags)
		{
			var result = new List<IParaFragment>();
			var interestingParas = ParagraphsToSearch;
			foreach (var tagInstance in matchedTags)
			{
				// Enhance GJM: This works until tags can span paragraphs
				var myPara = tagInstance.BeginSegmentRA.Owner as IStTxtPara;
				if (!interestingParas.Contains(myPara))
					continue;
				result.Add(MakeOccurrence(myPara,
					GetReferenceBeginOffsetInPara(tagInstance),
					GetReferenceEndOffsetInPara(tagInstance)));
			}
			return result;
		}