示例#1
0
 public void StoreValues(Data data, string path)
 {
     data.SetValue(@"" + path + @"AccountId", Data.EscapeString(AccountId));
     data.SetValue(@"" + path + @"AuthenticationType", AuthenticationType.ToString());
     data.SetValue(@"" + path + @"FtpConnectionType", FtpConnectionType.ToString());
     data.SetValue(@"" + path + @"KeyFileRequiresPass", KeyFileRequiresPass.ToString());
     data.SetValue(@"" + path + @"Password", _password);
     data.SetValue(@"" + path + @"PrivateKeyFile", Data.EscapeString(PrivateKeyFile));
     data.SetValue(@"" + path + @"Server", Data.EscapeString(Server));
     data.SetValue(@"" + path + @"UserName", Data.EscapeString(UserName));
 }
示例#2
0
        public override bool Equals(object o)
        {
            if (!(o is FtpAccount))
            {
                return(false);
            }
            FtpAccount v = o as FtpAccount;

            if (!AccountId.Equals(v.AccountId))
            {
                return(false);
            }
            if (!AuthenticationType.Equals(v.AuthenticationType))
            {
                return(false);
            }
            if (!FtpConnectionType.Equals(v.FtpConnectionType))
            {
                return(false);
            }
            if (!KeyFileRequiresPass.Equals(v.KeyFileRequiresPass))
            {
                return(false);
            }
            if (!Password.Equals(v.Password))
            {
                return(false);
            }
            if (!PrivateKeyFile.Equals(v.PrivateKeyFile))
            {
                return(false);
            }
            if (!Server.Equals(v.Server))
            {
                return(false);
            }
            if (!UserName.Equals(v.UserName))
            {
                return(false);
            }
            return(true);
        }