LicFileLicenseProvider

LicFileLicenseProvider

System.ComponentModel (system.dll) class

In this implementation of LicenseProvider , the GetLicense() member looks for a file called ClassName.LIC in the same directory as the .dll containing the component. It then uses the IsKeyValid() method to see if the file contains the key string provided by the GetKey() method. By default, the string is: "ClassName is a licensed component." You could derive a class that overrides one or both of these methods to provide a more complex .LIC file licensing scheme.

 public class  LicFileLicenseProvider  : LicenseProvider {  // Public Constructors  public  LicFileLicenseProvider  ();  // Public Instance Methods  public override License  GetLicense  (LicenseContext  context  , Type  type  , object  instance  ,          bool  allowExceptions  );  // overrides LicenseProvider   // Protected Instance Methods  protected virtual string  GetKey  (Type  type  );    protected virtual bool  IsKeyValid  (string  key  , Type  type  ); } 

Hierarchy

System.Object LicenseProvider LicFileLicenseProvider



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net