Пример #1
0
 private static BOLSingleton Instance()
 {
     if (instance == null)
     {
         instance = new BOLSingleton();
     }
     return(instance);
 }
Пример #2
0
 public static BOLSingleton getInstance(string username, string password)
 {
     if (!username.Equals("") && !password.Equals(""))
     {
         BOLSingleton.username = username;
         BOLSingleton.password = password;
         return(BOLSingleton.Instance());
     }
     else
     {
         throw new Exception("Username and Password cannot be '' or null!");
     }
 }
Пример #3
0
 public static BOLSingleton getInstance()
 {
     return(BOLSingleton.getInstance(BOLSingleton.username, BOLSingleton.password));
 }