Coder Social home page Coder Social logo

iajtin / ismbios Goto Github PK

View Code? Open in Web Editor NEW
24.0 6.0 9.0 31.8 MB

iSMBIOS is a lightweight implementation that allows us to obtain SMBIOS information. Currently only works on windows

License: MIT License

Batchfile 0.01% C# 99.99%
smbios dmi bios hardware dmtf itin smbios-information

ismbios's People

Contributors

iajtin avatar nuklon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ismbios's Issues

assembly built in debug mode.

image
I was trying to use this in a UWP app that I am working on. and Windows App Cert kit give this message about iSMBIOS assemblies are built in debug mode. is there something wrong with the build pipeline?

Crashing on SMBIOS 3.1

got a system that's on SMBIOS 3.1, the program crashed when trying to get the property for Type0.

at iTin.Core.Helpers.SentinelHelper.IsTrue(Boolean expression, String message)
at iTin.Core.Helpers.SentinelHelper.IsTrue(Boolean expression)
at iTin.Core.Int32Extensions.GetByte(Int32 value, Byte onebyte)
at iTin.Core.Int32Extensions.GetByte(Int32 value, Bytes onebyte)
at iTin.Core.Hardware.Specification.Smbios.SmbiosType000.get_ExtendedBiosRomSizeUnits() in C:\iSMBIOS\src\iTin.Core.Hardware\Specification\SMBIOS\Structures\SmbiosType000 [BIOS Information].cs:line 347
at iTin.Core.Hardware.Specification.Smbios.SmbiosType000.Parse(Hashtable properties) in C:\iSMBIOS\src\iTin.Core.Hardware\Specification\SMBIOS\Structures\SmbiosType000 [BIOS Information].cs:line 550
at iTin.Core.Hardware.Specification.Smbios.SmbiosBaseType.get_Properties() in C:\iSMBIOS\src\iTin.Core.Hardware\Specification\SMBIOS\Structures\SmbiosBaseType.cs:line 84
at iTin.Core.Hardware.Specification.Dmi.DmiClass.get_Properties() in C:\iSMBIOS\src\iTin.Core.Hardware\Specification\DMI\DmiClass.cs:line 48

I checked the function, it seems the logic is throwing exception intentionally?

bug in v1.1.2

var structures = DMI.Instance.Structures;
            // type 0
    BiosVersion = GetSmbiosProperty(structures, DmiProperty.Bios.BiosVersion);

private static string GetSmbiosProperty(DmiStructureCollection structure, IPropertyKey key)
    {
        string result = null;
       
        result = structure.GetProperty(key).ToString();
            
    
        return result;
    }

the first time structure.GetProperty was called, it will throw exception....

Consider using Strong naming for the assemblies.

According to this MSDN document: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming

One important aspect of strong naming is that it's viral: a strong named assembly can only reference other strong named assemblies. If your library isn't strong named, then you have excluded developers who are building an application or library that needs strong naming from using it.

The benefits of strong naming are:

The assembly can be referenced and used by other strong-named assemblies.
The assembly can be stored in the Global Assembly Cache (GAC).
The assembly can be loaded side by side with other versions of the assembly. Side-by-side assembly loading is commonly required by applications with plug-in architectures.

non-strong naming assemblies can reference strong naming assemblies, but strong naming assemblies can only reference strong naming assemblies.

to allow most users to be able to use this library, I recommend use a snk file to sign the assembly projects. what needs to be done here is to create a snk file and share across the projects that are being packing into nuget package.

All other popular .net nuget packages are using this approach now.

nuget 1.1.0 libs identical with 1.0.9

recently when debugging an issue, I found that nuget 1.1.0 and 1.0.9 are identical.
image
--> this means the nuget 1.1.0 is actually the same as 1.0.9 in the end.
and I found that none of the libs carries version information, they are all 1.0.0.0
which will make it a bit difficult to track which version is in use when not looking in the source code.

my suggestion would be to create a build pipeline and mark the release versions during build.
any thought? @iAJTin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.