LicenseManager.IsValid Método
Definição
Determina se é possível conceder uma licença válida.Determines whether a valid license can be granted.
Sobrecargas
| IsValid(Type) |
Determina se é possível conceder uma licença válida para o tipo especificado.Determines whether a valid license can be granted for the specified type. |
| IsValid(Type, Object, License) |
Determina se é possível conceder uma licença válida para a instância especificada do tipo.Determines whether a valid license can be granted for the specified instance of the type. Esse método cria uma License válida.This method creates a valid License. |
IsValid(Type)
Determina se é possível conceder uma licença válida para o tipo especificado.Determines whether a valid license can be granted for the specified type.
public:
static bool IsValid(Type ^ type);
public static bool IsValid (Type type);
static member IsValid : Type -> bool
Public Shared Function IsValid (type As Type) As Boolean
Parâmetros
- type
- Type
Um Type que representa o tipo de objeto que solicita a License.A Type that represents the type of object that requests the License.
Retornos
true se uma licença válida puder ser concedida, caso contrário, false.true if a valid license can be granted; otherwise, false.
Comentários
O IsValid método retorna true quando o tipo não é licenciado ou é licenciado e a licença é válida.The IsValid method returns true when the type is either not licensed, or is licensed and the license is valid.
Esse método não lança um LicenseException quando não pode conceder um válido License .This method does not throw a LicenseException when it cannot grant a valid License. O Validate método gera exceções.The Validate method throws exceptions.
Confira também
- License
- LicenseContext
- LicenseException
- LicenseProvider
- LicenseProviderAttribute
- LicFileLicenseProvider
- LicenseUsageMode
Aplica-se a
IsValid(Type, Object, License)
public:
static bool IsValid(Type ^ type, System::Object ^ instance, [Runtime::InteropServices::Out] System::ComponentModel::License ^ % license);
public static bool IsValid (Type type, object instance, out System.ComponentModel.License license);
static member IsValid : Type * obj * License -> bool
Public Shared Function IsValid (type As Type, instance As Object, ByRef license As License) As Boolean
Parâmetros
- type
- Type
Um Type que representa o tipo de objeto que solicita a licença.A Type that represents the type of object that requests the license.
- instance
- Object
Um objeto do tipo especificado ou um tipo derivado do tipo especificado.An object of the specified type or a type derived from the specified type.
- license
- License
Uma License que é uma licença válida ou null se não for possível conceder uma licença válida.A License that is a valid license, or null if a valid license cannot be granted.
Retornos
true se uma License válida puder ser concedida, caso contrário, false.true if a valid License can be granted; otherwise, false.
Comentários
O IsValid método retorna true quando o type parâmetro não é licenciado ou quando é licenciado e o license parâmetro é válido.The IsValid method returns true when the type parameter is not licensed, or when it is licensed and the license parameter is valid.
Esse método não lança um LicenseException quando não pode conceder um válido License .This method does not throw a LicenseException when it cannot grant a valid License. O Validate método gera exceções.The Validate method throws exceptions.
Se o license parâmetro não for null após essa chamada, o objeto solicitando um License deve descartar a licença chamando o Dispose método quando o objeto for descartado ou finalizado.If the license parameter is not null after this call, the object asking for a License must dispose of the license by calling the Dispose method when the object is disposed of or finalized.
Confira também
- License
- LicenseContext
- LicenseException
- LicenseProvider
- LicenseProviderAttribute
- LicFileLicenseProvider
- LicenseUsageMode