You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FileGenerator.cs 699B

123456789101112131415161718192021222324252627
  1. using System.IO;
  2. namespace uqac_ia_sudoku_csp.Solver.Generators
  3. {
  4. public class FileGeneratorDbo
  5. {
  6. public string FilePath { get; set; }
  7. public string EmptyCharacters { get; set; }
  8. }
  9. public class FileGenerator : TextReaderGenerator
  10. {
  11. public override void Generate(Board board, object data)
  12. {
  13. var dbo = data as FileGeneratorDbo;
  14. using (var stream = File.OpenText(dbo.FilePath))
  15. {
  16. base.Generate(board, new TextReaderGeneratorDbo
  17. {
  18. EmptyCharacters = dbo.EmptyCharacters,
  19. Reader = stream
  20. });
  21. }
  22. }
  23. }
  24. }