Пример #1
0
        private string getUserName(ConnectionFactory cf)
        {
            string ownerResourceId;

            try {
                string[] sArray = cf.HostName.Split('.');
                ownerResourceId = sArray[0];
            }
            catch (Exception e) {
                throw new InvalidProgramException("hostName invalid");
            }
            // Console.WriteLine(ownerResourceId);
            return(AliyunUtils.getUserName(cf.UserName, ownerResourceId));
        }