AutoCompleteAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
属性付きメソッドを 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 型の使用方法を示しています。
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) |
COM+ AutoCompleteAttributeが有効かどうかを指定して、 |
プロパティ
| 名前 | 説明 |
|---|---|
| TypeId |
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
| Value |
COM+ の |
メソッド
| 名前 | 説明 |
|---|---|
| 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) |