ApplicationIDAttribute クラス

定義

このアセンブリのアプリケーション ID を (GUID として) 指定します。 このクラスは継承できません。

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

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

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

// References:
// System.EnterpriseServices

// The GUID (Globally Unique Identifier) shown below is for example purposes
// only and should be replaced by a GUID that you have generated.
[assembly: ApplicationID("727FC170-1D80-4e89-84CC-22AAB10A6F24")]

public class ApplicationIDAttribute_Value : ServicedComponent
{
    public void ValueExample()
    {
        // Get the ApplicationIDAttribute applied to the assembly.
        ApplicationIDAttribute attribute =
            (ApplicationIDAttribute)Attribute.GetCustomAttribute(
            System.Reflection.Assembly.GetExecutingAssembly(),
            typeof(ApplicationIDAttribute),
            false);

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


' References:
' System.EnterpriseServices

' The GUID (Globally Unique Identifier) shown below is for example purposes
' only and should be replaced by a GUID that you have generated.
<Assembly: ApplicationID("727FC170-1D80-4e89-84CC-22AAB10A6F24")> 

Public Class ApplicationIDAttribute_Value
    Inherits ServicedComponent
    
    Public Sub ValueExample() 
        ' Get the ApplicationIDAttribute applied to the assembly.
        Dim attribute As ApplicationIDAttribute = CType(Attribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(), GetType(ApplicationIDAttribute), False), ApplicationIDAttribute)
        
        ' Display the value of the attribute's Value property.
        MsgBox("ApplicationIDAttribute.Value: " & attribute.Value.ToString())

    End Sub
End Class

注釈

ApplicationIDAttribute は、そのコンストラクターで GUID を受け取ります。 登録が行われると、アセンブリ内のコンポーネントは、指定された ID を持つアプリケーションにインストールされます。

コンストラクター

ApplicationIDAttribute(String)

COM+ アプリケーションのアプリケーション ID を表している GUID を指定する、ApplicationIDAttribute クラスの新しいインスタンスを初期化します。

プロパティ

TypeId

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

(継承元 Attribute)
Value

COM+ アプリケーションの GUID を取得します。

メソッド

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)

適用対象