コード例 #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));
 }