ServiceHealthBehavior.TryParseBooleanQueryParameter(String, String, Boolean, Boolean) Método

Definição

Tenta analisar um parâmetro de cadeia de consulta booliana e retorna um valor que indica se a operação de análise foi bem-sucedida.Attempts to parse a Boolean query string parameter and returns a value that indicates whether the parsing operation succeeded.

protected:
 static bool TryParseBooleanQueryParameter(System::String ^ parameterName, System::String ^ parameter, bool defaultValue, [Runtime::InteropServices::Out] bool % result);
protected static bool TryParseBooleanQueryParameter (string parameterName, string parameter, bool defaultValue, out bool result);
static member TryParseBooleanQueryParameter : string * string * bool * bool -> bool
Protected Shared Function TryParseBooleanQueryParameter (parameterName As String, parameter As String, defaultValue As Boolean, ByRef result As Boolean) As Boolean

Parâmetros

parameterName
String

O nome do parâmetro cujo valor o método tenta analisar.The name of the parameter whose value the method attempts to parse.

parameter
String

O par campo/valor da cadeia de consulta.The field/value pair of the query string.

defaultValue
Boolean

O valor a ser atribuído ao argumento se a operação de análise falhar.The value to be assigned to the argument if the parsing operation fails.

result
Boolean

Quando o método for retornado, o valor do argumento booliano analisado.When the method returns, the value of the parsed Boolean argument.

Retornos

Boolean

true se a operação de gravação foi bem-sucedida; caso contrário, false.true if the parsing operation succeeded; otherwise, false.

Exceções

parameterName é null.parameterName is null.

- ou --or-

parameter é null.parameter is null.

Comentários

O método retorna true se o valor do campo foi analisado com êxito pelo Boolean.TryParse método.The method returns true if the value of the field was successfully parsed by the Boolean.TryParse method.

Aplica-se a