Random is now even more random
This commit is contained in:
parent
5dd7d343ee
commit
341de410f1
6 changed files with 46 additions and 9 deletions
29
Geekbot.net/Lib/IClients/RandomClient.cs
Normal file
29
Geekbot.net/Lib/IClients/RandomClient.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
|
||||
namespace Geekbot.net.Lib.IClients
|
||||
{
|
||||
|
||||
public interface IRandomClient
|
||||
{
|
||||
Random Client { get; set; }
|
||||
}
|
||||
|
||||
public sealed class RandomClient : IRandomClient
|
||||
{
|
||||
public RandomClient()
|
||||
{
|
||||
try
|
||||
{
|
||||
Client = new Random();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine("Start Redis pls...");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public Random Client { get; set; }
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue