public bool AddFirmware(string key, string SwPkgVersion, string SwPkgDescription, int SwColorStandardID, string SwFileChecksum, string SwFileChecksumType, string SwCreatedBy, string SwManufacturer, string SwDeviceType, List <string> SupportedModels, string BlobDescription) { PackageFile package = FirmwareCache.AddOrGetFirmware(key, new PackageFile()) as PackageFile; return(_dataOperations.AddSoftwarePackage(package?.SoftwarePakage, package?.HelpDocument, SwPkgVersion, SwPkgDescription, SwColorStandardID, package?.SoftwarePackageFileName, "bin", package.SoftwarePakage.LongLength, null, SwFileChecksum, SwFileChecksumType, SwCreatedBy, "Honeywell", "Camera", SupportedModels, BlobDescription, package?.HelpDocumentFileName, "pdf", package?.HelpDocument?.Length)); }
public bool DeleteSwPackageFromMemory(string key) { try { FirmwareCache.DeleteFromMemoryCache(key); return(true); } catch (Exception) { return(false); } }
public Guid UploadFirmware(byte[] firmwareSwPackg, string firmwareFilename, byte[] helpDoc, string helpDocFileName, string key) { PackageFile packageFile = new PackageFile(); packageFile.HelpDocument = helpDoc; packageFile.HelpDocumentFileName = helpDocFileName; packageFile.SoftwarePakage = firmwareSwPackg; packageFile.SoftwarePackageFileName = firmwareFilename; if (Guid.Empty != new Guid(key)) { FirmwareCache.DeleteFromMemoryCache(key); } var tempKey = Guid.NewGuid(); FirmwareCache.AddOrGetFirmware(tempKey.ToString(), packageFile); return(tempKey); }