Exemplo n.º 1
0
        internal void LoadMeta(FtMetaSequenceItem metaSequenceItem, FtMetaFieldList metaFieldList, FtFieldDefinitionList fieldDefinitionList)
        {
            int fieldIdx = metaFieldList.IndexOf(metaSequenceItem.Field);

            if (fieldIdx < 0)
            {
                throw FtInternalException.Create(InternalError.FtSequenceItem_LoadMeta_MetaSequenceItemFieldNotFoundInMetaFieldList, metaSequenceItem.Field.Name); // should never happen
            }
            else
            {
                fieldDefinition = fieldDefinitionList[fieldIdx]; // fieldDefinitions are in same order as Meta Fields
            }
        }
Exemplo n.º 2
0
        protected internal void AssignExcludingRedirects(FtMetaSequenceItem source, FtMetaFieldList fieldList, FtMetaFieldList sourceFieldList)
        {
            int fieldIndex = sourceFieldList.IndexOf(source.Field);

            if (fieldIndex < 0)
            {
                throw FtInternalException.Create(InternalError.FtMetaSequenceItem_AssignExcludingRedirects_SourceFieldNotFound); // should never happen
            }
            else
            {
                if (fieldIndex >= fieldList.Count)
                {
                    throw FtInternalException.Create(InternalError.FtMetaSequenceItem_AssignExcludingRedirects_FieldIndexOutOfRange, fieldIndex.ToString()); // should never happen
                }
                else
                {
                    Field = fieldList[fieldIndex];
                }
            }
        }