예제 #1
0
        private SoftwareInfo GetSoftware(IEnumerable <IProductBinarySoftwareDetector> detectors, byte[] inBuffer, SoftwareEncodingInfo encoding,
                                         IProgress <double> progress = null, CancellationToken token = default(CancellationToken))
        {
            var prefix = BootProvider.GetPrefix(CategoryName);

            if (encoding == null)
            {
                return(GetSoftware(detectors, prefix, inBuffer, progress, token));
            }
            return(DoGetSoftware(detectors, prefix, inBuffer, encoding, token));
        }
예제 #2
0
        public virtual SoftwareInfo GetSoftware(byte[] inBuffer, IProgress <double> progress, CancellationToken token)
        {
            var detectors = GetDetectors();
            var prefix    = BootProvider.GetPrefix(CategoryName);
            var software  = GetSoftware(detectors, prefix, inBuffer, progress, token);

            if (software != null)
            {
                var fileName = BootProvider.GetFileName(CategoryName);
                software.Hash = HashProvider.GetHash(inBuffer, fileName, HashName);
            }
            return(software);
        }