Exemple #1
0
        private TagNReplaceString(TagNReplaceString cloneFrom, eListCloneType listCloneType)
        {
            mbIgnoreTagCase = cloneFrom.mbIgnoreTagCase;

            mTagKeyComparer = new TagDefinitionValueComparer(mbIgnoreTagCase);

            // Same formatter instances used, but has its own list container.
            foreach (TagValueFormatterBase formatter in cloneFrom.mTagValueFormatters)
            {
                mTagValueFormatters.Add(formatter);
            }

            switch (listCloneType)
            {
            case eListCloneType.ByReference:
                mTagList = cloneFrom.mTagList;
                break;

            case eListCloneType.ByValue:
                mTagList = new TagNReplaceList(mTagKeyComparer, cloneFrom.mTagList);
                break;

            case eListCloneType.NewList:
                mTagList = new TagNReplaceList(mTagKeyComparer);
                break;
            }
        }
        private TagNReplaceString(TagNReplaceString cloneFrom, eListCloneType listCloneType)
        {
            mbIgnoreTagCase = cloneFrom.mbIgnoreTagCase;

            mTagKeyComparer = new TagDefinitionValueComparer(mbIgnoreTagCase);

            // Same formatter instances used, but has its own list container.
            foreach (TagValueFormatterBase formatter in cloneFrom.mTagValueFormatters)
                mTagValueFormatters.Add(formatter);

            switch (listCloneType)
            {
                case eListCloneType.ByReference:
                    mTagList = cloneFrom.mTagList;
                    break;
                case eListCloneType.ByValue:
                    mTagList = new TagNReplaceList(mTagKeyComparer, cloneFrom.mTagList);
                    break;
                case eListCloneType.NewList:
                    mTagList = new TagNReplaceList(mTagKeyComparer);
                    break;
            }
        }