示例#1
0
        /// <summary>Parse the tagger identity from the raw buffer.</summary>
        /// <remarks>
        /// Parse the tagger identity from the raw buffer.
        /// <p>
        /// 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.
        /// </remarks>
        /// <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));
        }