TagTool.Cache.TagCache.DuplicateTag C# (CSharp) Méthode

DuplicateTag() public méthode

Duplicates a tag.
public DuplicateTag ( Stream stream, TagInstance tag ) : TagInstance
stream Stream The stream to write to.
tag TagTool.TagGroups.TagInstance The tag to duplicate.
Résultat TagTool.TagGroups.TagInstance
        public TagInstance DuplicateTag(Stream stream, TagInstance tag)
        {
            if (tag == null)
                throw new ArgumentNullException(nameof(tag));

            // Just extract the tag and add it back
            var result = AllocateTag();
            SetTagDataRaw(stream, result, ExtractTagRaw(stream, tag));
            return result;
        }