Język

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

Wiadomość odpowiedzi.

status
HttpStatusCode

Kod statusu HTTP.

isXml
Boolean

Definiuje typ nagłówka ContentType , który ma być zapisywany w wiadomości. Jeśli trueparametr to , ContentType jest text/xml typem zawartości; w przeciwnym razie parametr ContentType ma text/smlwartość .

Wyjątki

Parametr message ma wartość null.

Dotyczy