SIL.FieldWorks.XWorks.DTMenuHandler.GetFlidIfPossible C# (CSharp) Method

GetFlidIfPossible() private method

This seems a bit clumsy, but the metadata cache now throws an exception if the class id/field name pair isn't valid for GetFieldId2(). So we check first in cases where we want a zero if not found.
private GetFlidIfPossible ( int clid, string fieldName, IFwMetaDataCacheManaged mdc ) : int
clid int
fieldName string
mdc IFwMetaDataCacheManaged
return int
		private int GetFlidIfPossible(int clid, string fieldName, IFwMetaDataCacheManaged mdc)
		{
			if (!mdc.FieldExists(clid, fieldName, true))
				return 0;
			return mdc.GetFieldId2(clid, fieldName, true);
		}