AutoCompleteAttribute クラス

定義

属性付きメソッドを AutoComplete オブジェクトとしてマークします。 このクラスは継承できません。

public ref class AutoCompleteAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)]
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class AutoCompleteAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, Inherited=true)>]
[<System.Runtime.InteropServices.ComVisible(false)>]
type AutoCompleteAttribute = class
    inherit Attribute
Public NotInheritable Class AutoCompleteAttribute
Inherits Attribute
継承
AutoCompleteAttribute
属性

次のコード例は、型の使用を AutoCompleteAttribute 示しています。

using System;
using System.EnterpriseServices;
using System.Reflection;

// References:
// System.EnterpriseServices

public class AutoCompleteAttribute_Example : ServicedComponent
{
    [AutoComplete]
    public void AutoCompleteAttribute_Ctor()
    {
    }

    [AutoComplete(true)]
    public void AutoCompleteAttribute_Ctor_Bool()
    {
    }

    [AutoComplete(false)]
    public void AutoCompleteAttribute_Value()
    {
        // Get information on the member.
        System.Reflection.MemberInfo[] memberinfo =
            this.GetType().GetMember(
            "AutoCompleteAttribute_Value");

        // Get the AutoCompleteAttribute applied to the member.
        AutoCompleteAttribute attribute =
            (AutoCompleteAttribute)System.Attribute.GetCustomAttribute(
            memberinfo[0],
            typeof(AutoCompleteAttribute),
            false);

        // Display the value of the attribute's Value property.
        Console.WriteLine("AutoCompleteAttribute.Value: {0}", attribute.Value);
    }
}
Imports System.EnterpriseServices
Imports System.Reflection


' References:
' System.EnterpriseServices

Public Class AutoCompleteAttribute_Example
    Inherits ServicedComponent
    
    <AutoComplete()>  _
    Public Sub AutoCompleteAttribute_Ctor() 
    
    End Sub

    <AutoComplete(True)>  _
    Public Sub AutoCompleteAttribute_Ctor_Bool() 
    
    End Sub

    <AutoComplete(False)>  _
    Public Sub AutoCompleteAttribute_Value() 
        ' Get information on the member.
        Dim memberinfo As System.Reflection.MemberInfo() = Me.GetType().GetMember("AutoCompleteAttribute_Value")
        
        ' Get the AutoCompleteAttribute applied to the member.
        Dim attribute As AutoCompleteAttribute = CType(System.Attribute.GetCustomAttribute(memberinfo(0), GetType(AutoCompleteAttribute), False), AutoCompleteAttribute)
        
        ' Display the value of the attribute's Value property.
        MsgBox("AutoCompleteAttribute.Value: " & attribute.Value)
    
    End Sub

End Class

注釈

指定した場合 AutoComplete は、COM+ カタログで無効にすることはできません。COM+ カタログで有効になっている場合は、コンポーネントで指定する必要があります。

メソッド呼び出し SetComplete が正常に返された場合、トランザクションは自動的に呼び出されます。 メソッド呼び出しで例外がスローされた場合、トランザクションは中止されます。

コンストラクター

AutoCompleteAttribute()

AutoCompleteAttribute クラスの新しいインスタンスを初期化して、トランザクションが正常に完了した場合にアプリケーションが自動的に SetComplete() を呼び出すように指定します。

AutoCompleteAttribute(Boolean)

AutoCompleteAttribute クラスの新しいインスタンスを初期化して、COM+ AutoComplete を有効にするかどうかを指定します。

プロパティ

TypeId

派生クラスで実装されると、この Attribute の一意の識別子を取得します。

(継承元 Attribute)
Value

COM+ の AutoComplete オプション設定を示す値を取得します。

メソッド

Equals(Object)

このインスタンスが、指定されたオブジェクトと等価であるかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

派生クラスでオーバーライドされるとき、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)

派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されたプロパティおよびメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象