Code Monkey home page Code Monkey logo

Comments (4)

daalcant avatar daalcant commented on May 22, 2024

Partial fix currently exists in OAT repo branch: da/component-update, but set functionality hasn't been updated yet.

Modified FlagsInput.razor to still create checkboxes in cases where the flag enum member is null

from oat.

gfs avatar gfs commented on May 22, 2024

Modified FlagsInput.razor to still create checkboxes in cases where the flag enum member is null

This is probably the wrong approach. This should be covered by the set to null checkbox already.

from oat.

gfs avatar gfs commented on May 22, 2024

According to official documentation the way to check if a type is nullable is

Nullable.GetUnderlyingType(type) != null

https://docs.microsoft.com/en-us/dotnet/api/system.nullable.getunderlyingtype?view=net-5.0

However, this does not appear to work for Enums, and this method will instead return null. I've verified this behavior directly in OAT so it is not an ASA issue. Unfortunately, it doesn't seem viable to de-nullable the Enums in Attack Surface Analyzer as null is a valid value for them (some of the enums are only valid on windows systems and the flags are passed through.)

from oat.

gfs avatar gfs commented on May 22, 2024

I've narrowed this problem down to only Enums that start as null. Enums that are nullable but don't start as null now work.

from oat.

Related Issues (20)

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.