HttpMultipartFormDataContent Klasse

Definition

Stellt HTTP-Inhalt bereit, der den MIME-Typ multipart/form-data verwendet.

public ref class HttpMultipartFormDataContent sealed : IIterable<IHttpContent ^>, IClosable, IStringable, IHttpContent
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpMultipartFormDataContentFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpMultipartFormDataContent final : IIterable<IHttpContent>, IClosable, IStringable, IHttpContent
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.IHttpMultipartFormDataContentFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpMultipartFormDataContent final : IIterable<IHttpContent>, IClosable, IStringable, IHttpContent
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpMultipartFormDataContentFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpMultipartFormDataContent : IEnumerable<IHttpContent>, System.IDisposable, IStringable, IHttpContent
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.IHttpMultipartFormDataContentFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpMultipartFormDataContent : IEnumerable<IHttpContent>, System.IDisposable, IStringable, IHttpContent
function HttpMultipartFormDataContent(boundary)
Public NotInheritable Class HttpMultipartFormDataContent
Implements IDisposable, IEnumerable(Of IHttpContent), IHttpContent, IStringable
Vererbung
Object Platform::Object IInspectable HttpMultipartFormDataContent
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Hinweise

Auflisten der Sammlung in C# oder Microsoft Visual Basic

Sie können ein HttpMultipartFormDataContent-Objekt in C# oder Microsoft Visual Basic durchlaufen. In vielen Fällen, z. B. mithilfe der foreach-Syntax , führt der Compiler diese Umwandlung für Sie durch, und Sie müssen nicht explizit in IEnumerable<IHttpContent> umgewandelt werden. Wenn Sie eine explizite Umwandlung durchführen müssen, z. B. wenn Sie GetEnumerator aufrufen möchten, müssen Sie die Umwandlung in [IEnumerable<T>](/dotnet/api/system.collections.generic.ienumerable-1?view=dotnet-uwp-10.0&preserve-view=true mit einer IHttpContent-Einschränkung durchführen.

Konstruktoren

HttpMultipartFormDataContent()

Initialisiert eine neue instance der HttpMultipartFormDataContent-Klasse.

HttpMultipartFormDataContent(String)

Initialisiert eine neue instance der HttpMultipartFormDataContent-Klasse mit der angegebenen Begrenzungszeichenfolge.

Eigenschaften

Headers

Rufen Sie eine Auflistung von Inhaltsheadern ab, die für httpMultipartFormDataContent festgelegt sind.

Methoden

Add(IHttpContent)

Fügen Sie http-Inhalt zum httpMultipartFormDataContent-instance hinzu.

Add(IHttpContent, String)

Fügen Sie http-Inhalt mit einem angegebenen Namen zum httpMultipartFormDataContent-instance hinzu.

Add(IHttpContent, String, String)

Fügen Sie HTTP-Inhalte mit einem angegebenen Namen aus einer Datei zum httpMultipartFormDataContent-instance hinzu.

BufferAllAsync()

Serialisieren Sie httpMultipartFormDataContent als asynchroner Vorgang in den Arbeitsspeicher.

Close()

Schließt die zugeordneten Ressourcen httpMultipartFormDataContent instance und veröffentlicht.

Dispose()

Führt anwendungsspezifische Aufgaben durch, die mit der Freigabe, der Zurückgabe oder dem Zurücksetzen von nicht verwalteten Ressourcen zusammenhängen.

First()

Ruft ein -Objekt ab, das zum Auflisten der Inhalte im HttpMultipartFormDataContent-Objekt verwendet werden kann.

ReadAsBufferAsync()

Serialisieren Sie httpMultipartFormDataContent als asynchronen Vorgang in einen Puffer.

ReadAsInputStreamAsync()

Serialisieren Sie httpMultipartFormDataContent , und geben Sie einen Eingabedatenstrom zurück, der den Inhalt als asynchronen Vorgang darstellt.

ReadAsStringAsync()

Serialisieren Sie httpMultipartFormDataContent als asynchronen Vorgang in eine Zeichenfolge .

ToString()

Gibt eine Zeichenfolge zurück, die das aktuelle HttpMultipartFormDataContent-Objekt darstellt.

TryComputeLength(UInt64)

Bestimmt, ob httpMultipartFormDataContent eine gültige Länge in Bytes hat.

WriteToStreamAsync(IOutputStream)

Schreiben Sie httpMultipartFormDataContent als asynchronen Vorgang in einen Ausgabestream.

Gilt für:

Weitere Informationen