Esempio n. 1
0
        static void Main(string[] args)
        {
            try
            {
                Guard.IsNotNull(args, "args", "Solution file must be sent as a parameter");
                Guard.IsTrue(args.Length >= 1, "At least one parameter is required");

                //Although my implementation supports arbitrary board/block sizes, input files don't describe game dimensions so I'm
                //hard-coding sizes at the entry point
                var input = new SolutionLoader(args[0], new BoardDimensions(9, 9, 3, 3));
                var board = input.GetBoard();

                var verifier = new SolutionVerifier();
                Console.WriteLine(verifier.IsValid(board));
                Console.ReadLine();
            }
            catch (FileLoadException ex)
            {
                Console.WriteLine("File load exception: {0}\r\n{1}", ex.Message, ex.StackTrace);
            }
            catch (ArgumentException ex)
            {
                Console.WriteLine("{0} \r\n {1}", ex.Message, ex.StackTrace);
            }
            catch
            {
                //Unexpected exception, write to console and exit gracefully, a more realistic implementation would have proper logging that would
                //contain details about the exception by now
                Console.WriteLine("Unexpected exception");
            }
        }
Esempio n. 2
0
 public GetContactDetailBySolutionIdHandler(
     ContactDetailsReader contactDetailsReader,
     SolutionVerifier solutionVerifier,
     IMapper mapper)
 {
     this.contactDetailsReader = contactDetailsReader;
     this.solutionVerifier     = solutionVerifier;
     this.mapper = mapper;
 }
Esempio n. 3
0
 public GetImplementationTimescalesBySolutionIdHandler(
     ImplementationTimescalesReader implementationTimescalesReader,
     SolutionVerifier verifier,
     IMapper mapper)
 {
     this.implementationTimescalesReader = implementationTimescalesReader;
     this.verifier = verifier;
     this.mapper   = mapper;
 }
Esempio n. 4
0
 public GetIntegrationsBySolutionIdHandler(IntegrationsReader integrationsReader, SolutionVerifier verifier, IMapper mapper)
 {
     _integrationsReader = integrationsReader;
     _verifier           = verifier;
     _mapper             = mapper;
 }
Esempio n. 5
0
 public UpdateClaimedEpicsExecutor(SolutionVerifier verifier, SolutionEpicsUpdater updater)
 {
     _verifier = verifier;
     _updater  = updater;
 }
Esempio n. 6
0
 public GetIntegrationsBySolutionIdHandler(IntegrationsReader integrationsReader, SolutionVerifier verifier, IMapper mapper)
 {
     this.integrationsReader = integrationsReader;
     this.verifier           = verifier;
     this.mapper             = mapper;
 }
 public GetRoadMapBySolutionIdHandler(RoadMapReader roadMapReader, SolutionVerifier verifier, IMapper mapper)
 {
     _roadMapReader = roadMapReader;
     _verifier      = verifier;
     _mapper        = mapper;
 }
Esempio n. 8
0
 public UpdateSolutionContactDetailsExecutor(SolutionVerifier verifier, SolutionContactDetailsUpdater updater)
 {
     _verifier = verifier;
     _updater  = updater;
 }
 public GetRoadMapBySolutionIdHandler(RoadMapReader roadMapReader, SolutionVerifier verifier, IMapper mapper)
 {
     this.roadMapReader = roadMapReader;
     this.verifier      = verifier;
     this.mapper        = mapper;
 }
Esempio n. 10
0
 public GetPriceBySolutionIdHandler(PriceReader priceReader, SolutionVerifier verifier, IMapper mapper)
 {
     _priceReader = priceReader;
     _verifier    = verifier;
     _mapper      = mapper;
 }
 public UpdateIntegrationsExecutor(SolutionVerifier verifier, SolutionIntegrationsUpdater updater)
 {
     this.verifier = verifier;
     this.updater  = updater;
 }
 public UpdateRoadmapExecutor(SolutionVerifier verifier, SolutionRoadmapUpdater updater)
 {
     _verifier = verifier;
     _updater  = updater;
 }
Esempio n. 13
0
 public UpdateImplementationTimescalesExecutor(SolutionVerifier verifier, SolutionImplementationTimescalesUpdater updater)
 {
     this.verifier = verifier;
     this.updater  = updater;
 }
Esempio n. 14
0
 public UpdateSolutionSupplierExecutor(SolutionVerifier verifier, SolutionSupplierPartialUpdater updater)
 {
     this.verifier = verifier;
     this.updater  = updater;
 }
Esempio n. 15
0
 public UpdateCapabilitiesExecutor(SolutionVerifier verifier, SolutionCapabilitiesUpdater updater)
 {
     this.verifier = verifier;
     this.updater  = updater;
 }
 public UpdateRoadMapExecutor(SolutionVerifier verifier, SolutionRoadMapUpdater updater)
 {
     this.verifier = verifier;
     this.updater  = updater;
 }