Example #1
0
 public static MdoVistaDao getInstance()
 {
     if (_singleton == null)
     {
         lock (_locker)
         {
             if (_singleton == null)
             {
                 _singleton = new MdoVistaDao();
             }
         }
     }
     return(_singleton);
 }
 public IVistaDao getVistaDao(String daoType)
 {
     if (String.Equals("MdoVistaDao", daoType, StringComparison.CurrentCultureIgnoreCase))
     {
         return(MdoVistaDao.getInstance());
     }
     else if (String.Equals("WcfVistaDao", daoType, StringComparison.CurrentCultureIgnoreCase))
     {
         return(new WcfVistaDao());
     }
     else if (String.Equals("MockVistaDao", daoType, StringComparison.CurrentCultureIgnoreCase))
     {
         return(new MockVistaDao());
     }
     else
     {
         throw new ArgumentException("Invalid Vista DAO type!");
     }
 }