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 { } } } }
public void RegisterLicenseOverrideCommand(ProductLicenseCommand command) { LicenseServices.RegisterLicenseOverrideCommand(command); }