Exemple #1
0
 public static Car getLuxuryMercedes()
 {
     if (!storedObjects.ContainsKey("luxurymercedes"))
     {
         storedObjects["luxurymercedes"] = new LuxuryCarDecorator(new Mercedes());
     }
     return(storedObjects["luxurymercedes"]);
 }
Exemple #2
0
 public static Car getLuxuryNiva()
 {
     if (!storedObjects.ContainsKey("luxuryniva"))
     {
         storedObjects["luxuryniva"] = new LuxuryCarDecorator(new Niva());
     }
     return(storedObjects["luxuryniva"]);
 }