다음을 통해 공유


TeamFoundationSqlResourceComponent.VerifyServiceVersion Method (String, Int32, Int32%, Int32%)

Connects to the database, takes a shared session lock on the TfsDb resource and verifies that the database supports specified service version.

NOTE: This method will be re-written. We must query CONTEXT_INFO(), take a shared lock and query database service version using one query.

In addition, we must make sure that the database still supports current component in case we lost connection to the database.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Function VerifyServiceVersion ( _
    serviceName As String, _
    serviceVersion As Integer, _
    <OutAttribute> ByRef databaseVersion As Integer, _
    <OutAttribute> ByRef minDatabaseVersion As Integer _
) As Boolean
public bool VerifyServiceVersion(
    string serviceName,
    int serviceVersion,
    out int databaseVersion,
    out int minDatabaseVersion
)
public:
bool VerifyServiceVersion(
    String^ serviceName, 
    int serviceVersion, 
    [OutAttribute] int% databaseVersion, 
    [OutAttribute] int% minDatabaseVersion
)
member VerifyServiceVersion : 
        serviceName:string * 
        serviceVersion:int * 
        databaseVersion:int byref * 
        minDatabaseVersion:int byref -> bool
public function VerifyServiceVersion(
    serviceName : String, 
    serviceVersion : int, 
    databaseVersion : int, 
    minDatabaseVersion : int
) : boolean

Parameters

  • serviceVersion
    Type: System.Int32

    The version of the service that current component supports.

  • databaseVersion
    Type: System.Int32%

    Current version of the service supported by the database.

  • minDatabaseVersion
    Type: System.Int32%

    Minimum version of the service supported by the database.

Return Value

Type: System.Boolean

.NET Framework Security

See Also

Reference

TeamFoundationSqlResourceComponent Class

VerifyServiceVersion Overload

Microsoft.TeamFoundation.Framework.Server Namespace