Ejemplo n.º 1
0
        static int CheckConnection(string[] args)
        {
            if (args.Length < 4)
            {
                return(ARG_ERROR);
            }

            string vaultName = args[1];
            string userName  = args[2];
            string password  = args[3];

            return(PDMConnectionTool.CheckConnection(vaultName, userName, password));
        }
Ejemplo n.º 2
0
        static int Refresh(string[] args)
        {
            if (args.Length < 5)
            {
                return(ARG_ERROR);
            }

            string vaultName = args[1];
            string userName  = args[2];
            string password  = args[3];

            string[] fileRelativePaths = args[4].Split('|');

            return(PDMConnectionTool.RefreshFiles(vaultName, userName, password, fileRelativePaths));
        }
Ejemplo n.º 3
0
        static int Query(string[] args)
        {
            if (args.Length < 6)
            {
                return(ARG_ERROR);
            }

            string vaultName         = args[1];
            string userName          = args[2];
            string password          = args[3];
            string filePath          = args[4];
            string signVariableValue = args[5];  //标识

            return(PDMConnectionTool.QuerySignVariableChanged(vaultName, userName, password, filePath, SIGN_VARIABLE_NAME, signVariableValue));
        }
Ejemplo n.º 4
0
        static int CheckIn(string[] args)
        {
            if (args.Length < 6)
            {
                return(ARG_ERROR);
            }

            string vaultName = args[1];
            string userName  = args[2];
            string password  = args[3];
            bool   flag      = !(args[4] == "0");
            string files     = args[5];

            string[] filePaths = files.Split('|');
            return(PDMConnectionTool.CheckInFiles(vaultName, userName, password, flag, filePaths));
        }
Ejemplo n.º 5
0
        static int GetVaultPath(string[] args)
        {
            if (args.Length < 5)
            {
                return(ARG_ERROR);
            }

            string vaultName   = args[1];
            string userName    = args[2];
            string password    = args[3];
            string outFilePath = args[4];

            string vaultPath;
            int    ret = PDMConnectionTool.GetVaultRootPath(vaultName, userName, password, out vaultPath);

            if (ret == (int)PDMConnection.ResultCodes.LoginResult.OK)
            {
                string context = "[PDMInfo]\r\npath = " + vaultPath;
                File.WriteAllText(outFilePath, context);
            }
            return(ret);
        }