MustRunInClientContextAttribute クラス
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文<ComVisibleAttribute(False)> _ <AttributeUsageAttribute(AttributeTargets.Class, Inherited:=True)> _ Public NotInheritable Class MustRunInClientContextAttribute Inherits Attribute
[ComVisibleAttribute(false)] [AttributeUsageAttribute(AttributeTargets.Class, Inherited=true)] public sealed class MustRunInClientContextAttribute : Attribute
[ComVisibleAttribute(false)] [AttributeUsageAttribute(AttributeTargets::Class, Inherited=true)] public ref class MustRunInClientContextAttribute sealed : public Attribute
解説属性付きオブジェクトのコンテキスト属性が作成者のコンテキストのコンテキスト属性と競合する場合は、属性付きオブジェクトを作成しようとすると System.Runtime.InteropServices.COMException がスローされます。
使用例MustRunInClientContextAttribute 型の使用方法のコード例を次に示します。
Imports System Imports System.EnterpriseServices Imports System.Reflection ' References: ' System.EnterpriseServices <MustRunInClientContext()> _ Public Class MustRunInClientContextAttribute_Ctor Inherits ServicedComponent End Class 'MustRunInClientContextAttribute_Ctor <MustRunInClientContext(False)> _ Public Class MustRunInClientContextAttribute_Ctor_Bool Inherits ServicedComponent End Class 'MustRunInClientContextAttribute_Ctor_Bool <MustRunInClientContext(False)> _ Public Class MustRunInClientContextAttribute_Value Inherits ServicedComponent Public Sub ValueExample() ' Get the MustRunInClientContextAttribute applied to the class. Dim attribute As MustRunInClientContextAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(MustRunInClientContextAttribute), False), MustRunInClientContextAttribute) ' Display the value of the attribute's Value property. MsgBox("MustRunInClientContextAttribute.Value: " & attribute.Value) End Sub 'ValueExample End Class 'MustRunInClientContextAttribute_Value
using System; using System.EnterpriseServices; using System.Reflection; // References: // System.EnterpriseServices [MustRunInClientContext] public class MustRunInClientContextAttribute_Ctor : ServicedComponent { } [MustRunInClientContext(false)] public class MustRunInClientContextAttribute_Ctor_Bool : ServicedComponent { } [MustRunInClientContext(false)] public class MustRunInClientContextAttribute_Value : ServicedComponent { public void ValueExample() { // Get the MustRunInClientContextAttribute applied to the class. MustRunInClientContextAttribute attribute = (MustRunInClientContextAttribute)Attribute.GetCustomAttribute( this.GetType(), typeof(MustRunInClientContextAttribute), false); // Display the value of the attribute's Value property. Console.WriteLine("MustRunInClientContextAttribute.Value: {0}" , attribute.Value); } }
import System.*; import System.EnterpriseServices.*; import System.Reflection.*; // References: // System.EnterpriseServices /** @attribute MustRunInClientContext() */ public class MustRunInClientContextAttribute_Ctor extends ServicedComponent { } //MustRunInClientContextAttribute_Ctor /** @attribute MustRunInClientContext(false) */ public class MustRunInClientContextAttribute_Ctor_Bool extends ServicedComponent { } //MustRunInClientContextAttribute_Ctor_Bool /** @attribute MustRunInClientContext(false) */ public class MustRunInClientContextAttribute_Value extends ServicedComponent { public void ValueExample() { // Get the MustRunInClientContextAttribute applied to the class. MustRunInClientContextAttribute attribute = (MustRunInClientContextAttribute)(Attribute.GetCustomAttribute( this.GetType(), MustRunInClientContextAttribute.class.ToType() , false)); // Display the value of the attribute's Value property. Console.WriteLine("MustRunInClientContextAttribute.Value: {0}" , (System.Boolean)attribute.get_Value()); } //ValueExample } //MustRunInClientContextAttribute_Value
継承階層System.Attribute
System.EnterpriseServices.MustRunInClientContextAttribute
スレッド セーフ
プラットフォーム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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照MustRunInClientContextAttribute コンストラクタ ()
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文
使用例新しい MustRunInClientContextAttribute を作成するコード例を次に示します。
<MustRunInClientContext()> _ Public Class MustRunInClientContextAttribute_Ctor Inherits ServicedComponent End Class 'MustRunInClientContextAttribute_Ctor
.NET Framework のセキュリティ
プラットフォーム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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照MustRunInClientContextAttribute クラス
MustRunInClientContextAttribute メンバ
System.EnterpriseServices 名前空間
MustRunInClientContextAttribute コンストラクタ (Boolean)
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文
使用例新しい MustRunInClientContextAttribute を作成するコード例を次に示します。
<MustRunInClientContext(False)> _ Public Class MustRunInClientContextAttribute_Ctor_Bool Inherits ServicedComponent End Class 'MustRunInClientContextAttribute_Ctor_Bool
.NET Framework のセキュリティ
プラットフォーム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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照MustRunInClientContextAttribute クラス
MustRunInClientContextAttribute メンバ
System.EnterpriseServices 名前空間
MustRunInClientContextAttribute コンストラクタ
オーバーロードの一覧| 名前 | 説明 |
|---|---|
| MustRunInClientContextAttribute () | MustRunInClientContextAttribute クラスの新しいインスタンスを初期化して、作成者のコンテキストでのオブジェクトの作成を要求します。 |
| MustRunInClientContextAttribute (Boolean) | MustRunInClientContextAttribute クラスの新しいインスタンスを初期化します。作成者のコンテキストにオブジェクトを作成しないようにすることもできます。 |
参照関連項目
MustRunInClientContextAttribute クラスMustRunInClientContextAttribute メンバ
System.EnterpriseServices 名前空間
MustRunInClientContextAttribute プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |
| Value | 属性付きオブジェクトが作成者のコンテキストで作成されるかどうかを示す値を取得します。 |
参照MustRunInClientContextAttribute メソッド
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Equals | オーバーロードされます。 ( Attribute から継承されます。) |
| GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。) |
| GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。) |
| GetHashCode | このインスタンスのハッシュ コードを返します。 ( Attribute から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
| IsDefaultAttribute | 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 ( Attribute から継承されます。) |
| IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。) |
| Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
| ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
参照MustRunInClientContextAttribute メンバ
可能な場合に作成者のコンテキストで属性付きオブジェクトを強制的に作成します。このクラスは継承できません。
MustRunInClientContextAttribute データ型で公開されるメンバを以下の表に示します。
パブリック コンストラクタ| 名前 | 説明 | |
|---|---|---|
| MustRunInClientContextAttribute | オーバーロードされます。 MustRunInClientContextAttribute クラスの新しいインスタンスを初期化します。 |
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |
| Value | 属性付きオブジェクトが作成者のコンテキストで作成されるかどうかを示す値を取得します。 |
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Equals | オーバーロードされます。 ( Attribute から継承されます。) |
| GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。) |
| GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。) |
| GetHashCode | このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
| IsDefaultAttribute | 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。) |
| IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。) |
| Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
| ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
参照- MustRunInClientContextAttributeのページへのリンク