Udostępnij za pośrednictwem


ServiceHealthBehavior.AddHttpProperty Metoda

Definicja

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.

Dotyczy