Beispiel #1
0
        /// <summary>
        /// Generates the specified number of random resource names with the same prefix.
        /// </summary>
        /// <param name="prefix">the prefix to be used if possible</param>
        /// <param name="maxLen">the maximum length for the random generated name</param>
        /// <param name="count">the number of names to generate</param>
        /// <returns>random names</returns>
        public static string[] RandomResourceNames(string prefix, int maxLen, int count)
        {
            string[] names         = new string[count];
            var      resourceNamer = new ResourceNamer("");

            for (int i = 0; i < count; i++)
            {
                names[i] = resourceNamer.RandomName(prefix, maxLen);
            }
            return(names);
        }
Beispiel #2
0
        public static string RandomGuid()
        {
            var namer = new ResourceNamer("");

            return(namer.RandomGuid());
        }
Beispiel #3
0
        public static string RandomResourceName(string prefix, int maxLen)
        {
            var namer = new ResourceNamer("");

            return(namer.RandomName(prefix, maxLen));
        }