RequestContextExtensions.CreateComponent<TInterface, TComponent> メソッド (TeamFoundationRequestContext, String)
データベースの現在のバージョンとの通信に使用できるコンポーネントを作成します。 ) が含まれている項目を使用して、擬似/stubbable している場合は、インターフェイスによって体。
名前空間: Microsoft.TeamFoundation.Framework.Server
アセンブリ: Microsoft.TeamFoundation.Framework.Server (Microsoft.TeamFoundation.Framework.Server.dll 内)
構文
'宣言
<ExtensionAttribute> _
Public Shared Function CreateComponent(Of TInterface, TComponent As {Class, New, ISqlResourceComponent, TInterface}) ( _
context As TeamFoundationRequestContext, _
databaseCategory As String _
) As TInterface
public static TInterface CreateComponent<TInterface, TComponent>(
this TeamFoundationRequestContext context,
string databaseCategory
)
where TComponent : class, new(), ISqlResourceComponent, TInterface
型パラメーター
- TInterface
コンポーネントによって実装されるインターフェイス mockable
- TComponent
作成するコンポーネントの型。
パラメーター
- databaseCategory
型: System.String
データベースのカテゴリ。
戻り値
型: TInterface
使用上の注意
Visual Basic および Visual C# では、このメソッドを、TeamFoundationRequestContext 型のオブジェクトのインスタンス メソッドとして呼び出すことができます。インスタンス メソッド構文を使用してこのメソッドを呼び出す場合は、最初のパラメーターを省略します。詳細については、「拡張メソッド (Visual Basic)」または「拡張メソッド (C# プログラミング ガイド)」を参照してください。
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。