public TiffFieldInfo FindFieldInfoByName(string name, TiffType type)
{
if (m_foundfield != null && m_foundfield.Name == name &&
(type == TiffType.ANY || type == m_foundfield.Type))
{
return m_foundfield;
}
// If we are invoked with no field information, then just return.
if (m_fieldinfo == null)
return null;
m_foundfield = null;
foreach (TiffFieldInfo info in m_fieldinfo)
{
if (info != null && info.Name == name &&
(type == TiffType.ANY || type == info.Type))
{
m_foundfield = info;
break;
}
}
return m_foundfield;
}