Skip to content
| Marketplace
Sign in
Visual Studio>Templates>Null object generator
Null object generator

Null object generator

Null object generator

|
1,112 installs
| (1) | Free
Permet de generer les classes permettant de repondre au Pattern NullObject
Download

Null Object Design Pattern

The intent of a Null Object is to encapsulate the absence of an object by providing a substitutable alternative that offers suitable default do nothing behavior. In short, a design where "nothing will come of nothing"

Use the Null Object pattern when

an object requires a collaborator. The Null Object pattern does not introduce this collaboration--it makes use of a collaboration that already exists some collaborator instances should do nothing you want to abstract the handling of null away from the client.

How to use this tools

Consider the following solution:

Initial_solutiob.png

And the following classes:

Initial_classes.png

Add a new item to the models folder:

Add_new_item.png

Search and select the template Null Object Pattern Generator

null_object_item.png

After adding, classes are rewritten

Classes_rewritten.png

the tools generated the following classes

extend_classes_generated.png null_classes_generated.PNG

Now it's your turn!!!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft