public void Assign(FtMetaSubstitutionList source) { list.Clear(); list.Capacity = source.Count; for (int i = 0; i < source.Count; i++) { FtMetaSubstitution substitution = source[i].CreateCopy(); Add(substitution); } }
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(); }