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

            redirect.Assign(this, sequenceList, sourceSequenceList);
            return(redirect);
        }
Example #2
0
 public void AssignRedirects(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     for (int i = 0; i < Count; i++)
     {
         list[i].AssignRedirects(sequenceList, sourceSequenceList);
     }
 }
Example #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;
        }
Example #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;
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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();
        }
Example #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];
                }
            }
        }
Example #9
0
 protected internal override void Assign(FtMetaSequenceRedirect source, FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     base.Assign(source, sequenceList, sourceSequenceList);
 }
Example #10
0
 protected internal void AssignRedirects(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     redirectList.Assign(redirectList, sequenceList, sourceSequenceList);
 }
Example #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;
        }
Example #12
0
 protected internal abstract FtMetaSequenceRedirect CreateCopy(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList);
Example #13
0
 internal void AssignRedirects(FtMetaSequenceList sequenceList, FtMetaSequenceList sourceSequenceList)
 {
     itemList.AssignRedirects(sequenceList, sourceSequenceList);
 }
Example #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;
        }
Example #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);
     }
 }
Example #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
            }
        }
Example #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;
        }