Beispiel #1
0
        public static CSUsernameRow GenerateRandomRow()
        {
            CSUsernameFileModel data   = StrongRandom.GenerateRandom <CSUsernameFileModel>();
            CSUsernameRow       output = new CSUsernameRow()
            {
                RowData = data
            };

            return(output);
        }
Beispiel #2
0
 public CSUsernameController(IDatabase database = null, int createRandomRows = 0, bool generateHeaderRow = true)
 {
     GenerateHeaderRow = generateHeaderRow;
     fileRows          = new List <CSUsernameRow>();
     Filename          = $"{fileNamePrefix}{DateTime.Now.ToString("yyyyMMdd_hhmmss")}.TXT.dec";
     for (int i = 0; i < createRandomRows; i++)
     {
         CSUsernameRow row = GenerateRandomRow();
         row.Verifications.Add((str, data, rowNum) => str.VerifyInDatabase(data));
         row.SetRowNumber(fileRows.Count + 1); //Rows are not 0 indexed.
         fileRows.Add(row);
     }
     this.database = database;
 }