using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
namespace Inventory.Test.Library.Plugin
{
public class GenerateDatesPlugin
{
private static Random random = new Random((int)DateTime.Now.Ticks);//thanks to McAden
///
/// Generates a random string with the given length
///
/// Size of the string
/// If true, generate lowercase string
/// Random string
private string RandomString(int size)
{
StringBuilder builder = new StringBuilder();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
return builder.ToString();
}
///
/// Generates a random string with the given length
///
/// Size of the string
/// If true, generate lowercase string
/// Random string
private string RandomNumbersString(int size)
{
StringBuilder builder = new StringBuilder();
int ch;
for (int i = 0; i < size; i++)
{
ch = random.Next(9);
builder.Append(ch);
}
return builder.ToString().Substring(0, size);
}
}
}