示例#1
0
 public override void OnCompleted()
 {
     try {
         // apply license verification
         UnderlyingJob.Complete();
         if (File.Exists(LocalFileName))
         {
             var command = XmlProvider.ReadFromFile <ProductLicenseCommand>(
                 LocalFileName,
                 Encoding.ASCII
                 );
             LicenseServices.RegisterLicenseOverrideCommand(command);
             if (CommandDownloaded != null)
             {
                 CommandDownloaded(this, new BITSLicenseCommandDownloadEvent {
                     Command = command
                 });
             }
         }
     } catch {
         // ServicesProvider.ReportError(error);
     } finally {
         if (File.Exists(LocalFileName))
         {
             try {
                 File.Delete(LocalFileName);
             } catch {
             }
         }
     }
 }
示例#2
0
 public void RegisterLicenseOverrideCommand(ProductLicenseCommand command)
 {
     LicenseServices.RegisterLicenseOverrideCommand(command);
 }
示例#3
0
 public void RemoveLicenseOverrideCommand()
 {
     LicenseServices.RemoveLicenseOverrideCommand();
 }
示例#4
0
 public void RegisterLicenseKey(string key)
 {
     LicenseServices.RegisterLicenseKey(key);
 }