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

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

ConstructionEnabledAttribute のインスタンスの初期プロパティ値の一覧については、ConstructionEnabledAttribute コンストラクタのトピックを参照してください。

この属性を使用して、オブジェクト コンストラクタ文字列を ServicedComponent クラスに関連付ける方法のコード例を次に示します。
' Accept a constructor string. <ConstructionEnabled()> _ Public Class EmployeeInformation Inherits ServicedComponent ' The employee's user name and salary. Private accountName As String Private salary As Double = 0 ' Get the employee's name. All users can call this method. Public Function GetName() As String Return accountName End Function 'GetName ' Set the employee's salary. Only managers can do this. Public Sub SetSalary(ByVal ammount As Double) If SecurityCallContext.CurrentCall.IsCallerInRole("Manager") Then salary = ammount Else Throw New UnauthorizedAccessException() End If End Sub 'SetSalary ' Get the employee's salary. Only the employee and managers can do this. Public Function GetSalary() As Double If SecurityCallContext.CurrentCall.DirectCaller.AccountName = accountName OrElse SecurityCallContext.CurrentCall.IsCallerInRole("Manager") Then Return salary Else Throw New UnauthorizedAccessException() End If End Function 'GetSalary ' Use the constructor string. ' This method is called when the object is instantiated. Protected Overrides Sub Construct(ByVal constructorString As String) accountName = constructorString End Sub 'Construct End Class 'EmployeeInformation
// Accept a constructor string. [ConstructionEnabled] public class EmployeeInformation : ServicedComponent { // The employee's user name and salary. private string accountName; private double salary = 0; // Get the employee's name. All users can call this method. public string GetName () { return(accountName); } // Set the employee's salary. Only managers can do this. public void SetSalary (double ammount) { if (SecurityCallContext.CurrentCall.IsCallerInRole("Manager")) { salary = ammount; } else { throw new UnauthorizedAccessException(); } } // Get the employee's salary. Only the employee and managers can do this. public double GetSalary () { if ( SecurityCallContext.CurrentCall.DirectCaller.AccountName == accountName || SecurityCallContext.CurrentCall.IsCallerInRole("Manager") ) { return(salary); } else { throw new UnauthorizedAccessException(); } } // Use the constructor string. // This method is called when the object is instantiated. protected override void Construct (string constructorString) { accountName = constructorString; } }
// Accept a constructor string. [ConstructionEnabled] public ref class EmployeeInformation: public ServicedComponent { private: // The employee's user name and salary. String^ accountName; double salary; public: // Get the employee's name. All users can call this method. String^ GetName() { return (accountName); } // Set the employee's salary. Only managers can do this. void SetSalary( double ammount ) { if ( SecurityCallContext::CurrentCall->IsCallerInRole( "Manager" ) ) { salary = ammount; } else { throw gcnew UnauthorizedAccessException; } } // Get the employee's salary. Only the employee and managers can do this. double GetSalary() { if ( SecurityCallContext::CurrentCall->DirectCaller->AccountName == accountName || SecurityCallContext::CurrentCall->IsCallerInRole( "Manager" ) ) { return (salary); } else { throw gcnew UnauthorizedAccessException; } } protected: // Use the constructor string. // This method is called when the object is instantiated. virtual void Construct( String^ constructorString ) override { accountName = constructorString; } };
// Accept a constructor string. /** @attribute ConstructionEnabled() */ public class EmployeeInformation extends ServicedComponent { // The employee's user name and salary. private String accountName; private double salary = 0; // Get the employee's name. All users can call this method. public String GetName() { return accountName; } //GetName // Set the employee's salary. Only managers can do this. public void SetSalary(double ammount) throws System.UnauthorizedAccessException { if (SecurityCallContext.get_CurrentCall().IsCallerInRole("Manager")) { salary = ammount; } else { throw new UnauthorizedAccessException(); } } //SetSalary // Get the employee's salary. Only the employee and managers can do this. public double GetSalary() throws System.UnauthorizedAccessException { if (SecurityCallContext.get_CurrentCall().get_DirectCaller(). get_AccountName().Equals(accountName) || SecurityCallContext.get_CurrentCall(). IsCallerInRole("Manager")) { return salary; } else { throw new UnauthorizedAccessException(); } } //GetSalary // Use the constructor string. // This method is called when the object is instantiated. protected void Construct(String constructorString) { accountName = constructorString; } //Construct } //EmployeeInformation

System.Attribute
System.EnterpriseServices.ConstructionEnabledAttribute


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ConstructionEnabledAttribute コンストラクタ ()
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)




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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ConstructionEnabledAttribute コンストラクタ (Boolean)
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)



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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ConstructionEnabledAttribute コンストラクタ

名前 | 説明 |
---|---|
ConstructionEnabledAttribute () | ConstructionEnabledAttribute クラスの新しいインスタンスを初期化し、Enabled および Default の既定の設定を初期化します。 |
ConstructionEnabledAttribute (Boolean) | ConstructionEnabledAttribute クラスの新しいインスタンスを初期化し、Enabled を指定された値に設定します。 |

関連項目
ConstructionEnabledAttribute クラスConstructionEnabledAttribute メンバ
System.EnterpriseServices 名前空間
ConstructionEnabledAttribute プロパティ

名前 | 説明 | |
---|---|---|
![]() | Default | コンストラクタ文字列の既定値を取得または設定します。 |
![]() | Enabled | COM+ オブジェクトを構築できるかどうかを示す値を取得または設定します。 |
![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |

ConstructionEnabledAttribute メソッド

名前 | 説明 | |
---|---|---|
![]() | 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 から継承されます。) |

ConstructionEnabledAttribute メンバ
COM+ オブジェクトを構築できるようにします。このクラスは継承できません。
ConstructionEnabledAttribute データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Default | コンストラクタ文字列の既定値を取得または設定します。 |
![]() | Enabled | COM+ オブジェクトを構築できるかどうかを示す値を取得または設定します。 |
![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | 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 から継承されます。) |

Weblioに収録されているすべての辞書からConstructionEnabledAttributeを検索する場合は、下記のリンクをクリックしてください。

- ConstructionEnabledAttributeのページへのリンク