Inheritance: ICloudRequest
コード例 #1
0
 public string Authenticate(string username, string password)
 {
     if (this.username == username && this.password == password)
     {
         openstackobject = new OpenStack();
         return("Please check your username and password");
     }
     else
     {
         Console.Write("Áccess granted");
         return(token);
     }
 }
コード例 #2
0
        static void Main(string[] args)
        {
            String token;

            OpenStack o = new OpenStack("helo","e4rr4");
               token=o.Authenticate();
               Console.WriteLine(token);
               OpenStack o1 = new OpenStack("helo1", "e4rr41");
               token=o1.Authenticate();
               Console.WriteLine(token);
               OpenStack o2 = new OpenStack("helo", "e4rr4");
               token = o2.Authenticate();
               Console.WriteLine(token);
               Console.Read();
        }