Ejemplo n.º 1
0
        /// <summary>
        /// Parse into a new instance <typeparam name="T"/> without manually creating a XmlReadBuffer
        /// </summary>
        /// <param name="span">Text to parse</param>
        /// <param name="cdataMode"><see cref="m_cdataMode"/></param>
        /// <typeparam name="T">Type to parse</typeparam>
        /// <returns>The created instance</returns>
        public static T ReadStatic <T>(ReadOnlySpan <char> span, CDataMode cdataMode = CDataMode.On) where T : IXmlSerializable, new()
        {
            var reader = new XmlReadBuffer
            {
                m_cdataMode = cdataMode
            };

            return(reader.Read <T>(span));
        }
Ejemplo n.º 2
0
 public virtual bool ParseSubBody(ref XmlReadBuffer buffer, ulong hash,
                                  ReadOnlySpan <char> bodySpan, ReadOnlySpan <char> innerBodySpan,
                                  ref int end, ref int endInner)
 {
     return(false);
 }
Ejemplo n.º 3
0
 public virtual bool ParseAttribute(ref XmlReadBuffer buffer, ulong hash, SpanStr value)
 {
     return(false);
 }
Ejemplo n.º 4
0
 public virtual bool ParseFullBody(ref XmlReadBuffer buffer, ReadOnlySpan <char> bodySpan, ref int end)
 {
     return(false);
 }