コード例 #1
0
ファイル: DAO.cs プロジェクト: MikkelFunch/sliceofpie
 /// <summary>
 /// Accessor method for accessing the single instance of DAO.
 /// </summary>
 /// <returns>The only instance of DAO</returns>
 public static DAO GetInstance()
 {
     if (instance == null)
     {
         instance = new DAO();
     }
     return instance;
 }
コード例 #2
0
 /// <summary>
 /// Private constructor to ensure that Facade is not created outside this class.
 /// </summary>
 private PersistentStorage()
 {
     dao = DAO.GetInstance();
     fsh = FileSystemHandler.GetInstance();
 }