System.Uri.PrivateParseMinimalIri C# (CSharp) Method

PrivateParseMinimalIri() private method

private PrivateParseMinimalIri ( string newHost, ushort idx ) : void
newHost string
idx ushort
return void
        private void PrivateParseMinimalIri(string newHost, ushort idx)
        {
            // we have a new host!
            if (newHost != null)
                _string = newHost;

            // conditions where we don't need to go to parseremaining, so we copy the rest of the
            // original string.. and switch offsets
            if ((!_iriParsing && AllowIdn && (((_flags & Flags.IdnHost) != 0) || ((_flags & Flags.UnicodeHost) != 0))) ||
                (_iriParsing && ((_flags & Flags.HasUnicode) == 0) && AllowIdn && ((_flags & Flags.IdnHost) != 0)))
            {
                // update the start of path from the end of new string
                _flags &= ~(Flags.IndexMask);
                _flags |= (Flags)_string.Length;

                _string += _originalUnicodeString.Substring(idx, _originalUnicodeString.Length - idx);
            }

            // Indicate to createuriinfo that offset is in m_originalUnicodeString
            if (_iriParsing && ((_flags & Flags.HasUnicode) != 0))
            {
                // offset in Flags.IndexMask refers to m_originalUnicodeString
                _flags |= Flags.UseOrigUncdStrOffset;
            }
        }