SoapExtensionAttribute クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SoapExtensionAttribute クラスの意味・解説 

SoapExtensionAttribute クラス

派生クラスオーバーライドされると、SOAP 拡張機能XML Web サービス メソッドと共に実行するように指定します

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

Public MustInherit Class
 SoapExtensionAttribute
    Inherits Attribute
Dim instance As SoapExtensionAttribute
public abstract class SoapExtensionAttribute
 : Attribute
public ref class SoapExtensionAttribute abstract
 : public Attribute
public abstract class SoapExtensionAttribute
 extends Attribute
public abstract class SoapExtensionAttribute
 extends Attribute
解説解説
使用例使用例

SoapExtensionAttribute から派生した次の TraceExtensionAttribute クラスは、XML Web サービス メソッドまたは XML Web サービス クライアント プロキシ クラスメソッドへの属性適用サポートしますXML Web サービス メソッドまたは XML Web サービス クライアント プロキシ クラスメソッド属性適用されると、TraceExtension SOAP 拡張機能がそのメソッドと共に実行されます。

' Create a SoapExtensionAttribute for a SOAP extension that can be
' applied to an XML Web service method.
<AttributeUsage(AttributeTargets.Method)> _
Public Class TraceExtensionAttribute
    Inherits SoapExtensionAttribute
    
    Private m_filename As String
 = "c:\log.txt"
    Private m_priority As Integer

   ' Return the type of 'TraceExtension' class.
    Public Overrides ReadOnly
 Property ExtensionType() As Type
        Get
            Return GetType(TraceExtension)
        End Get
    End Property

   ' User can set priority of the 'TraceExtension'.
    Public Overrides Property
 Priority() As Integer
        Get
            Return m_priority
        End Get
        Set(ByVal Value As
 Integer)
            m_priority = value
        End Set
    End Property

    Public Property Filename() As
 String
        Get
            Return m_filename
        End Get
        Set(ByVal Value As
 String)
            m_filename = value
        End Set
    End Property
End Class
// Create a SoapExtensionAttribute for a SOAP extension that can be
// applied to an XML Web service method.
[AttributeUsage(AttributeTargets.Method)]
public class TraceExtensionAttribute : SoapExtensionAttribute
 {

    private string myFilename;
    private int myPriority;


    // Set the name of the log file were SOAP messages will be stored.
    public TraceExtensionAttribute() : base()
    {
        myFilename = "C:\\logClient.txt";
    }

    // Return the type of 'TraceExtension' class.
    public override Type ExtensionType
    {
        get
        {
            return typeof(TraceExtension);
        }
    }

    // User can set priority of the 'SoapExtension'.
    public override int Priority 
    {
        get 
        {
            return myPriority;
        }
        set 
        { 
            myPriority = value;
        }
    }

    public string Filename 
    {
        get
        {
            return myFilename;
        }
        set
        {
            myFilename = value;
        }
    }
}
// Create a SoapExtensionAttribute for a SOAP extension that can be
// applied to an XML Web service method.

[AttributeUsage(AttributeTargets::Method)]
public ref class TraceExtensionAttribute: public
 SoapExtensionAttribute
{
private:
   String^ myFilename;
   int myPriority;

public:

   // Set the name of the log file were SOAP messages will be stored.
   TraceExtensionAttribute()
      : SoapExtensionAttribute()
   {
      myFilename = "C:\\logClient.txt";
   }

   property Type^ ExtensionType 
   {
      // Return the type of 'TraceExtension' class.
      virtual Type^ get() override
      {
         return TraceExtension::typeid;
      }
   }

   property int Priority 
   {
      // User can set priority of the 'SoapExtension'.
      virtual int get() override
      {
         return myPriority;
      }

      virtual void set( int
 value ) override
      {
         myPriority = value;
      }
   }

   property String^ Filename 
   {
      String^ get()
      {
         return myFilename;
      }

      void set( String^ value )
      {
         myFilename = value;
      }
   }
};
// Create a SoapExtensionAttribute for a SOAP extension that can be
// applied to an XML Web service method.
/** @attribute AttributeUsage(AttributeTargets.Method)
 */
public class TraceExtensionAttribute extends
 SoapExtensionAttribute
{
    private String myFilename;
    private int myPriority;

    // Set the name of the log file were SOAP messages will be stored.
    public TraceExtensionAttribute()
    {
        myFilename = "C:\\logClient.txt";
    } //TraceExtensionAttribute

    // Return the type of 'TraceExtension' class.
    public Type get_ExtensionType()
    {
        return TraceExtension.class.ToType();
    } //get_ExtensionType

    // User can set priority of the 'SoapExtension'.
    public int get_Priority()
    {
        return myPriority;
    } //get_Priority

    public void set_Priority(int
 value)
    {
        myPriority = value;
    } //set_Priority

    public String get_Filename()
    {
        return myFilename;
    } //get_Filename

    public void set_Filename(String value)
    {
        myFilename = value;
    } //set_Filename
} //TraceExtensionAttribute
継承階層継承階層
System.Object
   System.Attribute
    System.Web.Services.Protocols.SoapExtensionAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapExtensionAttribute メンバ
System.Web.Services.Protocols 名前空間
SoapExtension クラス
SoapMessage



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

辞書ショートカット

すべての辞書の索引

「SoapExtensionAttribute クラス」の関連用語

SoapExtensionAttribute クラスのお隣キーワード
検索ランキング

   

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



SoapExtensionAttribute クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS