ServiceHealthBehavior.AddHttpProperty Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Ustawia typ zawartości i kod stanu HTTP dla komunikatu odpowiedzi.
protected:
static void AddHttpProperty(System::ServiceModel::Channels::Message ^ message, System::Net::HttpStatusCode status, bool isXml);
protected static void AddHttpProperty (System.ServiceModel.Channels.Message message, System.Net.HttpStatusCode status, bool isXml);
static member AddHttpProperty : System.ServiceModel.Channels.Message * System.Net.HttpStatusCode * bool -> unit
Protected Shared Sub AddHttpProperty (message As Message, status As HttpStatusCode, isXml As Boolean)
Parametry
- message
- Message
Komunikat odpowiedzi.
- status
- HttpStatusCode
Kod stanu HTTP.
- isXml
- Boolean
Definiuje typ ContentType nagłówka, który ma być zapisywany w komunikacie. Jeśli true , to typ ContentType text/xml zawartości, a w przeciwnym razie to ContentType text/sml .
Wyjątki
message to null.