Table of Contents

Class FormDataSet

Namespace
AngleSharp.Html
Assembly
AngleSharp.dll

Bundles information stored in HTML forms.

public sealed class FormDataSet : IEnumerable<string>, IEnumerable
Inheritance
FormDataSet
Implements
Inherited Members
Extension Methods

Constructors

FormDataSet()

Creates a new form data set with a randomly generated boundary.

public FormDataSet()

Properties

Boundary

Gets the chosen boundary.

public string Boundary { get; }

Property Value

string

Methods

Append(string, IFile, string)

Appends a file entry to the form data set.

public void Append(string name, IFile value, string type)

Parameters

name string

The name of the entry.

value IFile

The value of the entry.

type string

The type of the entry.

Append(string, string, string)

Appends a text entry to the form data set.

public void Append(string name, string value, string type)

Parameters

name string

The name of the entry.

value string

The value of the entry.

type string

The type of the entry.

As(IFormSubmitter, Encoding?)

Applies the given submitter to serialize the form data set.

public Stream As(IFormSubmitter submitter, Encoding? encoding = null)

Parameters

submitter IFormSubmitter

The algorithm to use.

encoding Encoding

(Optional) Explicit encoding.

Returns

Stream

A stream containing the body.

AsJson()

public Stream AsJson()

Returns

Stream

A stream containing the body.

AsMultipart(IHtmlEncoder, Encoding?)

public Stream AsMultipart(IHtmlEncoder htmlEncoder, Encoding? encoding = null)

Parameters

htmlEncoder IHtmlEncoder

HTML encoder.

encoding Encoding

(Optional) Explicit encoding.

Returns

Stream

A stream containing the body.

AsPlaintext(Encoding?)

public Stream AsPlaintext(Encoding? encoding = null)

Parameters

encoding Encoding

(Optional) Explicit encoding.

Returns

Stream

A stream containing the body.

AsUrlEncoded(Encoding?)

public Stream AsUrlEncoded(Encoding? encoding = null)

Parameters

encoding Encoding

(Optional) Explicit encoding.

Returns

Stream

A stream containing the body.

GetEnumerator()

Gets an enumerator over all entry names.

public IEnumerator<string> GetEnumerator()

Returns

IEnumerator<string>

The enumerator.