Delen via


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

This method connects to the database, takes a shared or exclusive 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 ensure 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
<BrowsableAttribute(False)> _
Public Function VerifyServiceVersion ( _
    serviceName As String, _
    serviceVersion As Integer, _
    <OutAttribute> ByRef databaseVersion As Integer, _
    <OutAttribute> ByRef minDatabaseVersion As Integer, _
    acquireExclusiveLock As Boolean _
) As Boolean
[BrowsableAttribute(false)]
public bool VerifyServiceVersion(
    string serviceName,
    int serviceVersion,
    out int databaseVersion,
    out int minDatabaseVersion,
    bool acquireExclusiveLock
)
[BrowsableAttribute(false)]
public:
bool VerifyServiceVersion(
    String^ serviceName, 
    int serviceVersion, 
    [OutAttribute] int% databaseVersion, 
    [OutAttribute] int% minDatabaseVersion, 
    bool acquireExclusiveLock
)
[<BrowsableAttribute(false)>]
member VerifyServiceVersion : 
        serviceName:string * 
        serviceVersion:int * 
        databaseVersion:int byref * 
        minDatabaseVersion:int byref * 
        acquireExclusiveLock:bool -> bool
public function VerifyServiceVersion(
    serviceName : String, 
    serviceVersion : int, 
    databaseVersion : int, 
    minDatabaseVersion : int, 
    acquireExclusiveLock : boolean
) : 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
Returns Boolean.

.NET Framework Security

See Also

Reference

TeamFoundationSqlResourceComponent Class

VerifyServiceVersion Overload

Microsoft.TeamFoundation.Framework.Server Namespace