Code Monkey home page Code Monkey logo

Comments (2)

Kryptos-FR avatar Kryptos-FR commented on July 17, 2024

That is not the purpose of NotNull. It is a design-time only attribute used to let ReSharper do a static analysis to detect wrong usages of nullability.

See: https://www.jetbrains.com/help/resharper/Reference__Code_Annotation_Attributes.html

from xenko.

stefnotch avatar stefnotch commented on July 17, 2024

@Kryptos-FR Oh, I assumed that it didn't have anything to do with that [NotNull] attribute, since it's defined inside SiliconStudio.Core.Annotations.

Well, what would be an alternative to achieve what I want to achieve? It's not that uncommon that a component needs a reference to another component to work properly.

Checking it in code would require me to write a lot of extra code that I would prefer to avoid writing. Also, it would be a runtime check rather than a game-studio-time check.

Dependency injection would be one alternative that I can think of right now.

from xenko.

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.