AutoCompleteAttribute クラス
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)

<AttributeUsageAttribute(AttributeTargets.Method, Inherited:=True)> _ <ComVisibleAttribute(False)> _ Public NotInheritable Class AutoCompleteAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Method, Inherited=true)] [ComVisibleAttribute(false)] public sealed class AutoCompleteAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Method, Inherited=true)] [ComVisibleAttribute(false)] public ref class AutoCompleteAttribute sealed : public Attribute

AutoComplete を指定した場合、COM+ カタログでは無効にしないでください。逆に、COM+ カタログで有効にした場合は、コンポーネントで指定する必要があります。
メソッドの呼び出しが正常に返されると、トランザクションにより、自動的に SetComplete が呼び出されます。そのメソッドの呼び出しで例外がスローされた場合、トランザクションは中止されます。

AutoCompleteAttribute 型の使用方法のコード例を次に示します。
Imports System Imports System.EnterpriseServices Imports System.Reflection ' References: ' System.EnterpriseServices Public Class AutoCompleteAttribute_Example Inherits ServicedComponent <AutoComplete()> _ Public Sub AutoCompleteAttribute_Ctor() End Sub 'AutoCompleteAttribute_Ctor <AutoComplete(True)> _ Public Sub AutoCompleteAttribute_Ctor_Bool() End Sub 'AutoCompleteAttribute_Ctor_Bool <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 'AutoCompleteAttribute_Value End Class 'AutoCompleteAttribute_Example
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); } }
import System.*; import System.EnterpriseServices.*; import System.Reflection.*; // References: // System.EnterpriseServices public class AutoCompleteAttribute_Example extends ServicedComponent { /** @attribute AutoComplete() */ public void AutoCompleteAttribute_Ctor() { } //AutoCompleteAttribute_Ctor /** @attribute AutoComplete(true) */ public void AutoCompleteAttribute_Ctor_Bool() { } //AutoCompleteAttribute_Ctor_Bool /** @attribute 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], AutoCompleteAttribute.class.ToType(), false)); // Display the value of the attribute's Value property. Console.WriteLine("AutoCompleteAttribute.Value: {0}", System.Convert.ToString(attribute.get_Value())); } //AutoCompleteAttribute_Value } //AutoCompleteAttribute_Example

System.Attribute
System.EnterpriseServices.AutoCompleteAttribute


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- AutoCompleteAttribute クラスのページへのリンク