コード例 #1
0
 public static DevicesManager GetInstance()
 {
     if (Instance == null)
     {
         Instance = new DevicesManager();
     }
     return(Instance);
 }
コード例 #2
0
ファイル: Cooker.cs プロジェクト: pierrethenot/MasterChefInfo
 /// <summary>
 /// Instantiate a cooker
 /// </summary>
 /// <param name="toolsStorage"></param>
 public Cooker(int id, Washer washer, Oven oven)
 {
     this.Id             = id;
     this.ToolsStorage   = ToolsManager.GetInstance();
     this.DevicesStorage = DevicesManager.GetInstance();
     this.WasherEngine   = washer;
     this.OvenCook       = oven;
     this.IsAvailable    = true;
 }