SIL.FieldWorks.FdoUi.InflectionClassEditor.IsItemEligible C# (CSharp) Method

IsItemEligible() private method

private IsItemEligible ( ISilDataAccess sda, int hvo, Set possiblePOS ) : bool
sda ISilDataAccess
hvo int
possiblePOS Set
return bool
		private bool IsItemEligible(ISilDataAccess sda, int hvo, Set<int> possiblePOS)
		{
			bool fEnable = false;
			var ls = m_cache.ServiceLocator.GetInstance<ILexSenseRepository>().GetObject(hvo);
			if (ls.MorphoSyntaxAnalysisRA != null && ls.MorphoSyntaxAnalysisRA is IMoStemMsa)
			{
				var msa = ls.MorphoSyntaxAnalysisRA as IMoStemMsa;
				var pos = msa.PartOfSpeechRA;
				if (pos != null && possiblePOS.Contains(pos.Hvo))
				{
					// Only show it as a change if it is different
					fEnable = msa.InflectionClassRA == null || msa.InflectionClassRA.Hvo != m_selectedHvo;
				}
			}
			return fEnable;
		}