Example #1
0
        /// <summary>
        /// Parse the tagger identity from the raw buffer.
        /// <para />
        /// This method parses and returns the content of the tagger line, After
        /// taking the tag's character set into account and decoding the tagger
        /// name and email address. This method is fairly expensive and produces a
        /// new PersonIdent instance on each invocation. Callers should invoke this
        /// method only if they are certain they will be outputting the result, and
        /// should cache the return value for as long as necessary to use all
        /// information from it.
        /// </summary>
        /// <returns>
        /// Identity of the tagger (name, email) and the time the tag
        /// was made by the tagger; null if no tagger line was found.
        /// </returns>
        public PersonIdent getTaggerIdent()
        {
            byte[] raw   = _buffer;
            int    nameB = RawParseUtils.tagger(raw, 0);

            if (nameB < 0)
            {
                return(null);
            }
            return(RawParseUtils.parsePersonIdent(raw, nameB));
        }