TeamFoundationServiceException.ExtractInt Method
Parses a SqlError message and extracts the field identified by the key.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Shared Function ExtractInt ( _
error As SqlError, _
key As String _
) As Integer
public static int ExtractInt(
SqlError error,
string key
)
public:
static int ExtractInt(
SqlError^ error,
String^ key
)
static member ExtractInt :
error:SqlError *
key:string -> int
public static function ExtractInt(
error : SqlError,
key : String
) : int
Parameters
error
Type: System.Data.SqlClient.SqlErrorThe error to search.
key
Type: System.StringWhich value to look for.
Return Value
Type: System.Int32
The extracted integer value, or -1 if the value is not found or is not a valid integer.
Remarks
Searches for the pattern %key=value% and returns value as an int.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.