Exemplo n.º 1
0
        protected internal override FtMetaSequenceRedirect CreateCopy(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
        {
            FtMetaSequenceRedirect redirect = SequenceRedirectFactory.CreateMetaSequenceRedirect(Type);

            redirect.Assign(this, sequenceList, sourceSequenceList);
            return(redirect);
        }
Exemplo n.º 2
0
 public void AssignRedirects(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     for (int i = 0; i < Count; i++)
     {
         list[i].AssignRedirects(sequenceList, sourceSequenceList);
     }
 }
Exemplo n.º 3
0
        protected internal override void Assign(FtMetaSequenceRedirect source, FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
        {
            base.Assign(source, sequenceList, sourceSequenceList);

            FtExactDecimalMetaSequenceRedirect typedSource = source as FtExactDecimalMetaSequenceRedirect;

            Value = typedSource.Value;
        }
Exemplo n.º 4
0
        protected internal override void Assign(FtMetaSequenceRedirect source, FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
        {
            base.Assign(source, sequenceList, sourceSequenceList);

            FtCaseInsensitiveStringMetaSequenceRedirect typedSource = source as FtCaseInsensitiveStringMetaSequenceRedirect;

            Value = typedSource.Value;
        }
Exemplo n.º 5
0
        protected internal void Assign(FtMetaSequenceRedirectList source, FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
        {
            list.Clear();
            list.Capacity = source.Count;

            for (int i = 0; i < source.Count; i++)
            {
                FtMetaSequenceRedirect redirect = source[i].CreateCopy(sequenceList, sourceSequenceList);
                Add(redirect);
            }
        }
Exemplo n.º 6
0
        internal void Assign(FtMetaSequenceList source, FtMetaFieldList fieldList, FtMetaFieldList sourceFieldList)
        {
            list.Clear();
            list.Capacity = source.Count;

            for (int i = 0; i < source.Count; i++)
            {
                FtMetaSequence sequence = source[i].CreateCopyExcludingRedirects(fieldList, sourceFieldList);
                Add(sequence);
            }

            // All Sequences need to be created before we can assign Redirects

            for (int i = 0; i < Count; i++)
            {
                list[i].AssignRedirects(this, source);
            }
        }
Exemplo n.º 7
0
        public FtMeta()
        {
            fieldList = new FtMetaFieldList();
            fieldList.BeforeRemoveEvent += HandleFieldListBeforeRemoveEvent;
            fieldList.BeforeClearEvent  += HandleFieldListBeforeClearEvent;
            fieldList.DefaultHeadingConstraintRequiredEvent += HandleFieldDefaultHeadingConstraintRequiredEvent;
            fieldList.DefaultHeadingQuotedTypeRequiredEvent += HandleFieldDefaultHeadingQuotedTypeRequiredEvent;
            fieldList.DefaultHeadingAlwaysWriteOptionalQuoteRequiredEvent += HandleFieldDefaultHeadingAlwaysWriteOptionalQuoteRequiredEvent;
            fieldList.DefaultHeadingWritePrefixSpaceRequiredEvent         += HandleFieldDefaultHeadingWritePrefixSpaceRequiredEvent;
            fieldList.DefaultHeadingPadAlignmentRequiredEvent             += HandleFieldDefaultHeadingPadAlignmentRequiredEvent;
            fieldList.DefaultHeadingPadCharTypeRequiredEvent    += HandleFieldDefaultHeadingPadCharTypeRequiredEvent;
            fieldList.DefaultHeadingPadCharRequiredEvent        += HandleFieldDefaultHeadingPadCharRequiredEvent;
            fieldList.DefaultHeadingTruncateTypeRequiredEvent   += HandleFieldDefaultHeadingTruncateTypeRequiredEvent;
            fieldList.DefaultHeadingTruncateCharRequiredEvent   += HandleFieldDefaultHeadingTruncateCharRequiredEvent;
            fieldList.DefaultHeadingEndOfValueCharRequiredEvent += HandleFieldDefaultHeadingEndOfValueCharRequiredEvent;
            substitutionList = new FtMetaSubstitutionList();
            sequenceList     = new FtMetaSequenceList();

            Reset();
        }
Exemplo n.º 8
0
        protected internal virtual void Assign(FtMetaSequenceRedirect source, FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
        {
            InvokationDelay = source.InvokationDelay;

            int sequenceIndex = sourceSequenceList.IndexOf(source.Sequence);

            if (sequenceIndex < 0)
            {
                throw FtInternalException.Create(InternalError.FtMetaSequenceItem_Assign_SourceFieldNotFound); // should never happen
            }
            else
            {
                if (sequenceIndex >= sequenceList.Count)
                {
                    throw FtInternalException.Create(InternalError.FtMetaSequenceItem_Assign_FieldIndexOutOfRange, sequenceIndex.ToString()); // should never happen
                }
                else
                {
                    Sequence = sequenceList[sequenceIndex];
                }
            }
        }
Exemplo n.º 9
0
 protected internal override void Assign(FtMetaSequenceRedirect source, FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     base.Assign(source, sequenceList, sourceSequenceList);
 }
Exemplo n.º 10
0
 protected internal void AssignRedirects(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     redirectList.Assign(redirectList, sequenceList, sourceSequenceList);
 }
Exemplo n.º 11
0
        internal protected override void LoadMeta(FtMetaSequenceRedirect metaSequenceRedirect, FtMetaSequenceList metaSequenceList, FtSequenceList sequenceList)
        {
            base.LoadMeta(metaSequenceRedirect, metaSequenceList, sequenceList);

            FtBooleanMetaSequenceRedirect booleanMetaRedirect = metaSequenceRedirect as FtBooleanMetaSequenceRedirect;

            value = booleanMetaRedirect.Value;
        }
Exemplo n.º 12
0
 protected internal abstract FtMetaSequenceRedirect CreateCopy(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList);
Exemplo n.º 13
0
 internal void AssignRedirects(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     itemList.AssignRedirects(sequenceList, sourceSequenceList);
 }
Exemplo n.º 14
0
        internal protected override void LoadMeta(FtMetaSequenceRedirect metaSequenceRedirect, FtMetaSequenceList metaSequenceList, FtSequenceList sequenceList)
        {
            base.LoadMeta(metaSequenceRedirect, metaSequenceList, sequenceList);

            FtExactDateTimeMetaSequenceRedirect dateTimeMetaRedirect = metaSequenceRedirect as FtExactDateTimeMetaSequenceRedirect;

            value = dateTimeMetaRedirect.Value;
        }
Exemplo n.º 15
0
 internal protected void LoadMetaSequenceRedirects(FtMetaSequenceItem metaSequenceItem, FtMetaSequenceList metaSequenceList, FtSequenceList sequenceList)
 {
     for (int i = 0; i < metaSequenceItem.RedirectList.Count; i++)
     {
         int redirectType            = metaSequenceItem.RedirectList[i].Type;
         FtSequenceRedirect redirect = redirectList.New(redirectType);
         redirect.LoadMeta(metaSequenceItem.RedirectList[i], metaSequenceList, sequenceList);
     }
 }
Exemplo n.º 16
0
        internal protected virtual void LoadMeta(FtMetaSequenceRedirect metaSequenceRedirect, FtMetaSequenceList metaSequenceList, FtSequenceList sequenceList)
        {
            type            = metaSequenceRedirect.Type;
            invokationDelay = metaSequenceRedirect.InvokationDelay;

            int sequenceIdx = metaSequenceList.IndexOf(metaSequenceRedirect.Sequence);

            if (sequenceIdx < 0)
            {
                throw FtInternalException.Create(InternalError.FtSequenceRedirect_LoadMeta_MetaSequenceRedirectSequenceNotFoundInMetaSequenceList, metaSequenceRedirect.Sequence.Name); // should never happen
            }
            else
            {
                sequence = sequenceList[sequenceIdx]; // sequenceList are in same order as Meta Sequence List
            }
        }
Exemplo n.º 17
0
        internal protected override void LoadMeta(FtMetaSequenceRedirect metaSequenceRedirect, FtMetaSequenceList metaSequenceList, FtSequenceList sequenceList)
        {
            base.LoadMeta(metaSequenceRedirect, metaSequenceList, sequenceList);

            FtCaseInsensitiveStringMetaSequenceRedirect stringMetaRedirect = metaSequenceRedirect as FtCaseInsensitiveStringMetaSequenceRedirect;

            value = stringMetaRedirect.Value;
        }