Share via


WebGetAttribute.ResponseFormat プロパティ

定義

ResponseFormat プロパティを取得または設定します。

public:
 property System::ServiceModel::Web::WebMessageFormat ResponseFormat { System::ServiceModel::Web::WebMessageFormat get(); void set(System::ServiceModel::Web::WebMessageFormat value); };
public System.ServiceModel.Web.WebMessageFormat ResponseFormat { get; set; }
member this.ResponseFormat : System.ServiceModel.Web.WebMessageFormat with get, set
Public Property ResponseFormat As WebMessageFormat

プロパティ値

WebMessageFormat

WebMessageFormat 列挙値のいずれか。

ResponseFormat プロパティを設定する方法を次の例に示します。

[OperationContract]
[WebGet(ResponseFormat= WebMessageFormat.Json)]
long Mod(long x, long y);
<OperationContract()> _
<WebGet(ResponseFormat:=WebMessageFormat.Json)> _
Function Modulo(ByVal x As Long, ByVal y As Long) As Long

注釈

このプロパティは、サービス操作から送信される応答の形式を決定します。 使用できる 2 つの値は XmlJson です。

適用対象