Exemplo n.º 1
0
 public static Vendeur Instance()
 {
     if (_instance == null)
     {
         _instance = new Vendeur();
     }
     return(_instance);
 }
Exemplo n.º 2
0
 void testSingleton()
 {
     // initialisation du vendeur du système
     ProjetSI73.Singleton.Vendeur leVendeur = ProjetSI73.Singleton.Vendeur.Instance();
     leVendeur.nom     = "Vendeur Auto";
     leVendeur.adresse = "Paris";
     leVendeur.email   = "*****@*****.**";
     // affichage du vendeur du système
     affiche();
 }
Exemplo n.º 3
0
 void affiche()
 {
     ProjetSI73.Singleton.Vendeur leVendeur = ProjetSI73.Singleton.Vendeur.Instance();
     leVendeur.affiche();
 }