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.Validate (Type, Object)

Determines if a license can be granted for the instance of the specified type.

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

Parameters

type
A Type that represents the type of object that wants the license.
instance
An object of the specified type or a type derived from the specified type.

Return Value

A valid License.

Exceptions

Exception Type Condition
LicenseException The type is licensed, but a License could not be granted.

Remarks

This method throws a LicenseException when a valid License cannot be granted. IsValid does not throw an exception.

If the license parameter is not a null reference (in Visual Basic 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.Validate Overload List | License | LicenseContext | LicenseException | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode