コード例 #1
0
        /// <summary>
        /// Writes a single atom.
        /// </summary>
        /// <param name="atom"></param>
        public void EnterAtom(AtomType atom)
        {
            _jsonWriter.WriteStartArray();
            _jsonWriter.WriteValue(atom.Name);
            _jsonWriter.WriteValue(atom.Text);

            atom.Payload.WriteTo(_jsonWriter);
        }
コード例 #2
0
 /// <summary>
 /// Finalizes writing an atom.
 /// </summary>
 /// <param name="atom"></param>
 public void ExitAtom(AtomType atom)
 {
     _jsonWriter.WriteEndArray();
 }
コード例 #3
0
 /// <summary>
 /// Checks whether an atom type can be rendered with this renderer.
 /// </summary>
 /// <param name="atomType">Atom type to render.</param>
 /// <returns>Returns <c>true</c> when the atom type can be rendered; Otherwise <c>false</c>.</returns>
 public abstract bool CanRender(AtomType atomType);
コード例 #4
0
 /// <summary>
 /// Renders the provided atom type and appends the output to the provided parent element.
 /// </summary>
 /// <param name="parentElement">parent element to render in.</param>
 /// <param name="atomType">Atom type to render.</param>
 public abstract void Render(HtmlNode parentElement, AtomType atomType);
コード例 #5
0
 public virtual void ExitAtom(AtomType atom)
 {
 }
コード例 #6
0
 public virtual void EnterAtom(AtomType atom)
 {
 }