HttpMethodAttribute.ParameterFormatter プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HttpMethodAttribute.ParameterFormatter プロパティの意味・解説 

HttpMethodAttribute.ParameterFormatter プロパティ

XML Web サービス クライアントから XML Web サービス メソッド送信されパラメータシリアル化する、Type取得または設定します

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Property ParameterFormatter As
 Type
Dim instance As HttpMethodAttribute
Dim value As Type

value = instance.ParameterFormatter

instance.ParameterFormatter = value
public Type ParameterFormatter { get; set;
 }
public:
property Type^ ParameterFormatter {
    Type^ get ();
    void set (Type^ value);
}
/** @property */
public Type get_ParameterFormatter ()

/** @property */
public void set_ParameterFormatter (Type value)
public function get ParameterFormatter
 () : Type

public function set ParameterFormatter
 (value : Type)

プロパティ
XML Web サービス クライアントから XML Web サービス メソッド送信されパラメータシリアル化する Type既定値はありません。

解説解説

XML Web サービス クライアントが、HTTP-GET または HTTP-POST を使用して XML Web サービス メソッド呼び出している場合ParameterFormatterXMLReturnReader にする必要があります

使用例使用例

HTTP-GET を使用する XML Web サービス クライアントに対して Wsdl.exe ユーティリティにより生成されるプロキシ クラスの例を次に示します。この場合は、ParameterFormatterXMLReturnReader必要な値に設定します

Public Class MyUser
    Inherits System.Web.Services.Protocols.HttpGetClientProtocol
    
    Public Sub New()
        Me.Url = "http://www.contoso.com/username.asmx"
    End Sub 'New
    
    <HttpMethodAttribute(GetType(XmlReturnReader), GetType(UrlParameterWriter))>
 _
    Public Function GetUserName() As
 UserName
        Return CType(Me.Invoke("GetUserName",
 Me.Url + "/GetUserName", New
 Object(0) {}), UserName)
    End Function 'GetUserName
    
    Public Function BeginGetUserName(callback
 As System.AsyncCallback, asyncState As Object)
 As System.IAsyncResult
        Return Me.BeginInvoke("GetUserName",
 Me.Url + "/GetUserName", New
 Object(0) {}, callback, asyncState)
    End Function 'BeginGetUserName
    
    Public Function EndGetUserName(asyncResult
 As System.IAsyncResult) As UserName
        Return CType(Me.EndInvoke(asyncResult),
 UserName)
    End Function 'EndGetUserName
End Class 'MyUser

<XmlRootAttribute(Namespace := "http://tempuri.org/",
 IsNullable := True)> _
Public Class UserName
    Public Name As String
    Public Domain As String

End Class 'UserName
public class MyUser : System.Web.Services.Protocols.HttpGetClientProtocol
 {
    
    public MyUser() {
        this.Url = "http://www.contoso.com/username.asmx";
    }
    
    [System.Web.Services.Protocols.HttpMethodAttribute(typeof(System.Web.Services.Protocols.XmlReturnReader),
 typeof(System.Web.Services.Protocols.UrlParameterWriter))]
    public UserName GetUserName() {
        return ((UserName)(this.Invoke("GetUserName",
 (this.Url + "/GetUserName"), new
 object[0])));
    }
    
    public System.IAsyncResult BeginGetUserName(System.AsyncCallback
 callback, object asyncState) {
        return this.BeginInvoke("GetUserName",
 (this.Url + "/GetUserName"), new
 object[0], callback, asyncState);
    }
    
    public UserName EndGetUserName(System.IAsyncResult asyncResult)
 {
        return ((UserName)(this.EndInvoke(asyncResult)));
    }
}

[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.org/",
 IsNullable=true)]
public class UserName {
    
    public string Name;
    
    public string Domain;
}

[System::Xml::Serialization::XmlRootAttribute(Namespace="http://tempuri.org/"
,IsNullable=true)]
public ref class UserName
{
public:
   String^ Name;
   String^ Domain;
};

public ref class MyUser: public
 System::Web::Services::Protocols::HttpGetClientProtocol
{
public:
   MyUser()
   {
      this->Url = "http://www.contoso.com/username.asmx";
   }

   [System::Web::Services::Protocols::HttpMethodAttribute(System::Web::Services::Protocols::XmlReturnReader::typeid
,System::Web::Services::Protocols::UrlParameterWriter::typeid)]
   UserName^ GetUserName()
   {
      return (dynamic_cast<UserName^>(this->Invoke(
 "GetUserName", (String::Concat( this->Url, "/GetUserName"
 )), gcnew array<Object^>(0) )));
   }

   System::IAsyncResult^ BeginGetUserName( System::AsyncCallback^ callback, Object^
 asyncState )
   {
      return this->BeginInvoke( "GetUserName",
 (String::Concat( this->Url, "/GetUserName" )),
 gcnew array<Object^>(0), callback, asyncState );
   }

   UserName^ EndGetUserName( System::IAsyncResult^ asyncResult )
   {
      return (dynamic_cast<UserName^>(this->EndInvoke(
 asyncResult )));
   }
};
public class MyUser extends System.Web.Services.Protocols.HttpGetClientProtocol
{    
    public MyUser()
    {
        this.set_Url("http://www.contoso.com/username.asmx");
    } //MyUser

    /** @attribute System.Web.Services.Protocols.HttpMethodAttribute(
        System.Web.Services.Protocols.XmlReturnReader .class,
 
        System.Web.Services.Protocols.UrlParameterWriter .class)
     */
    public UserName GetUserName()
    {
        return ((UserName)(this.Invoke("GetUserName",
 this.get_Url()
            + "/GetUserName", new Object[0])));
    } //GetUserName

    public System.IAsyncResult BeginGetUserName(System.AsyncCallback
 callback,
        Object asyncState)
    {
        return this.BeginInvoke("GetUserName",
 this.get_Url()
            + "/GetUserName", new Object[0], callback,
 asyncState);
    } //BeginGetUserName

    public UserName EndGetUserName(System.IAsyncResult asyncResult)
    {
        return ((UserName)(this.EndInvoke(asyncResult)));
    } //EndGetUserName
} //MyUser

/** @attribute System.Xml.Serialization.XmlRootAttribute(
    Namespace = "http://tempuri.org/", IsNullable = true)
 */
public class UserName
{
    public String name;
    public String domain;
} //UserName
class MyUser extends System.Web.Services.Protocols.HttpGetClientProtocol{
    
    function MyUser(){
        this.Url = "http://www.contoso.com/username.asmx"
    } //New
    
    public HttpMethodAttribute(XmlReturnReader, UrlParameterWriter)
    function GetUserName() : UserName{
        return UserName(this.Invoke("GetUserName",
 this.Url + "/GetUserName", new
 Object[0]))
    } //GetUserName

    function BeginGetUserName(callback : System.AsyncCallback,
 asyncState : Object) : System.IAsyncResult{
        return this.BeginInvoke("GetUserName",
 this.Url + "/GetUserName", new
 Object[0], callback, asyncState)
    } //BeginGetUserName

    function EndGetUserName(asyncResult : System.IAsyncResult)
 : UserName{
        return UserName(this.EndInvoke(asyncResult))
    } //EndGetUserName
} //MyUser

public XmlRootAttribute(Namespace = "http://tempuri.org/",
 IsNullable = true)
class UserName{
    var Name : String
    var Domain : String
} //UserName
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HttpMethodAttribute クラス
HttpMethodAttribute メンバ
System.Web.Services.Protocols 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

HttpMethodAttribute.ParameterFormatter プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HttpMethodAttribute.ParameterFormatter プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS