コード例 #1
0
        private static NVMeInfo GetDeviceInfo(StorageInfo storageInfo)
        {
            var      smart = new NVMeSmart(storageInfo);
            NVMeInfo info  = smart.GetInfo();

            return(info);
        }
コード例 #2
0
 private NVMeGeneric(StorageInfo storageInfo, NVMeInfo info, int index, ISettings settings)
     : base(storageInfo, info.Model, info.Revision, "nvme", index, settings)
 {
     Smart = new NVMeSmart(storageInfo);
     _info = info;
     CreateSensors();
 }
コード例 #3
0
        internal static AbstractStorage CreateInstance(StorageInfo storageInfo, ISettings settings)
        {
            NVMeInfo nvmeInfo = GetDeviceInfo(storageInfo);

            return(nvmeInfo == null ? null : new NVMeGeneric(storageInfo, nvmeInfo, storageInfo.Index, settings));
        }