HttpContentDispositionHeaderValue Classe

Définition

Représente la valeur de l’en-tête HTTP Content-Disposition sur le contenu HTTP dans une requête ou une réponse.

public ref class HttpContentDispositionHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory, 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 HttpContentDispositionHeaderValue final : IStringable
/// [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(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpContentDispositionHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory), 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 HttpContentDispositionHeaderValue : IStringable
[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(typeof(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpContentDispositionHeaderValue : IStringable
function HttpContentDispositionHeaderValue(dispositionType)
Public NotInheritable Class HttpContentDispositionHeaderValue
Implements IStringable
Héritage
Object Platform::Object IInspectable HttpContentDispositionHeaderValue
Attributs
Implémente

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Exemples

Consultez l’exemple de code dans la classe HttpContentHeaderCollection.

Remarques

La classe HttpContentDispositionHeaderValue représente des informations dans l’en-tête Content-Disposition sur le contenu HTTP envoyé dans une requête HTTP ou reçu dans une réponse HTTP.

La propriété ContentDisposition sur httpContentHeaderCollection renvoie une valeur HttpContentDispositionHeaderValue.

L’en-tête Content-Disposition est normalement utilisé pour travailler avec les chargements et téléchargements de fichiers. Le format diffère des autres en-têtes en ce qu’il s’agit d’un en-tête unique avec un type de disposition suivi d’une liste de paramètres, dont certains sont bien définis.

Cet en-tête est utilisé dans deux contextes différents :

Constructeurs

HttpContentDispositionHeaderValue(String)

Initialise une nouvelle instance de la classe HttpContentDispositionHeaderValue avec des informations de codage de contenu à utiliser dans l’en-tête HTTP Content-Disposition.

Propriétés

DispositionType

Obtient ou définit la valeur des informations de type de disposition dans l’en-tête HTTP Content-Disposition .

FileName

Obtient ou définit la valeur des informations filename-parm dans l’en-tête HTTP Content-Disposition pour un fichier unique.

FileNameStar

Obtient ou définit la valeur de la caractéristique filename-parm dans l’en-tête HTTP Content-Disposition pour plusieurs fichiers.

Name

Obtient ou définit le nom d’une partie de corps de contenu dans l’en-tête HTTP Content-Disposition .

Parameters

Obtient un ensemble de paramètres inclus dans l’en-tête HTTP Content-Disposition .

Size

Obtient ou définit la taille approximative, en octets, du fichier utilisé dans l’en-tête HTTP Content-Disposition .

Méthodes

Parse(String)

Convertit une chaîne en un instance HttpContentDispositionHeaderValue.

ToString()

Renvoie une chaîne qui représente l’objet HttpContentDispositionHeaderValue actuel.

TryParse(String, HttpContentDispositionHeaderValue)

Détermine si une chaîne est valide pour les informations HttpContentDispositionHeaderValue .

S’applique à

Voir aussi