Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ai.fluctio.fluctio-sim / Utils / General / NameGenerator.cs
Size: Mime:
using System;
using Fluctio.FluctioSim.Utils.Extensions;

namespace Fluctio.FluctioSim.Utils.General
{
	public static class NameGenerator
	{
		private static readonly string[] Adjectives = {
			"Lazy",
			"Shy",
			"Fancy",
			"New",
			"Cool",
			"Great",
			"Funky",
			"Purple",
			"Brave",
			"Calm",
		};
		
		private static readonly string[] Nouns = {
			"Corgi",
			"Robot",
			"Eagle",
			"River",
			"Book",
			"Soup",
			"Coffee",
			"House",
			"Car",
			"Cookie",
		};
		
		public static string GenerateName() => GenerateName(RandomExtensions.CommonRandom);
		
		public static string GenerateName(this Random random)
		{
			var adjective = random.FromList(Adjectives);
			var noun = random.FromList(Nouns);
			var number = random.Next(1000, 9999);
			return $"{adjective}{noun}{number}";
		}
	}
}