NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

LicenseManager.IsValid (Type, Object, License)

Determines if a valid license can be granted for the specified instance of the type. This method creates a valid License.

[Visual Basic]
Overloads Public Shared Function IsValid( _
   ByVal type As Type, _
   ByVal instance As Object, _
   ByRef license As License _
) As Boolean
[C#]
public static bool IsValid(
   Type type,
   object instance,
   ref License license
);
[C++]
public: static bool IsValid(
   Type* type,
   Object* instance,
   License** license
);
[JScript]
public static function IsValid(
   type : Type,
   instance : Object,
   license : License
) : Boolean;

Parameters

type
A Type that represents the type of object that is requesting the license.
instance
An object of the specified type or a type derived from the specified type.
license
This will contain a valid License on return from this method. If a valid License cannot be granted, this will be set to a null reference (in Visual Basic Nothing).

Return Value

true if a valid License can be granted; otherwise, false.

Remarks

IsValid will return 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.

If the license parameter is not a null reference (Nothing) after this call, the object asking for a License must dispose the license by calling the Dispose method when the object is disposed or finalized.

See Also

LicenseManager Class | LicenseManager Members | System.ComponentModel Namespace | LicenseManager.IsValid Overload List | License | LicenseContext | LicenseException | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode