LicenseManager.IsValid Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether a valid license can be granted.
Overloads
IsValid(Type) |
Determines whether a valid license can be granted for the specified type. |
IsValid(Type, Object, License) |
Determines whether a valid license can be granted for the specified instance of the type. This method creates a valid License. |
IsValid(Type)
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
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
Parameters
Returns
true
if a valid license can be granted; otherwise, false
.
Remarks
The IsValid method returns true
when the type is either not licensed, or is licensed and the license is valid.
This method does not throw a LicenseException when it cannot grant a valid License. The Validate method throws exceptions.
See also
- License
- LicenseContext
- LicenseException
- LicenseProvider
- LicenseProviderAttribute
- LicFileLicenseProvider
- LicenseUsageMode
Applies to
IsValid(Type, Object, License)
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
- Source:
- LicenseManager.cs
Determines whether a valid license can be granted for the specified instance of the type. This method creates a valid 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);
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
Parameters
- instance
- Object
An object of the specified type or a type derived from the specified type.
Returns
true
if a valid License can be granted; otherwise, false
.
Remarks
The IsValid method returns true
when the type
parameter is not licensed, or when it is licensed and the license
parameter is valid.
This method does not throw a LicenseException when it cannot grant a valid License. The Validate method throws exceptions.
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.
See also
- License
- LicenseContext
- LicenseException
- LicenseProvider
- LicenseProviderAttribute
- LicFileLicenseProvider
- LicenseUsageMode