Ejemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a copies of the instance of SFMarkerMapping
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public SFMarkerMapping Clone()
        {
            SFMarkerMapping clone = new SFMarkerMapping(m_fieldInfo);

            clone.m_fieldName     = m_fieldName;
            clone.m_marker        = m_marker;
            clone.m_isInterlinear = m_isInterlinear;
            return(clone);
        }
Ejemplo n.º 2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Checks the specified mapping list for the specified PA field. If a mapping for the
        /// field cannot be found, then one is created and added to the specified mappings
        /// list.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public static SFMarkerMapping VerifyMappingForField(List <SFMarkerMapping> mappingList,
                                                            PaFieldInfo fieldInfo)
        {
            foreach (SFMarkerMapping mapping in mappingList)
            {
                if (mapping.FieldName == fieldInfo.FieldName)
                {
                    return(null);
                }
            }

            // At this point, we know we didn't find the mapping
            SFMarkerMapping newMapping = new SFMarkerMapping(fieldInfo);

            mappingList.Add(newMapping);
            return(newMapping);
        }