BitMiracle.LibTiff.Classic.Tiff.FindFieldInfoByName C# (CSharp) Method

FindFieldInfoByName() public method

Retrieves field information for the tag with specified name.
public FindFieldInfoByName ( string name, TiffType type ) : TiffFieldInfo
name string The name of the tag to retrieve field information for.
type TiffType The tiff data type to use us additional filter.
return TiffFieldInfo
        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;
        }
Tiff