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"); } }
public GetContactDetailBySolutionIdHandler( ContactDetailsReader contactDetailsReader, SolutionVerifier solutionVerifier, IMapper mapper) { this.contactDetailsReader = contactDetailsReader; this.solutionVerifier = solutionVerifier; this.mapper = mapper; }
public GetImplementationTimescalesBySolutionIdHandler( ImplementationTimescalesReader implementationTimescalesReader, SolutionVerifier verifier, IMapper mapper) { this.implementationTimescalesReader = implementationTimescalesReader; this.verifier = verifier; this.mapper = mapper; }
public GetIntegrationsBySolutionIdHandler(IntegrationsReader integrationsReader, SolutionVerifier verifier, IMapper mapper) { _integrationsReader = integrationsReader; _verifier = verifier; _mapper = mapper; }
public UpdateClaimedEpicsExecutor(SolutionVerifier verifier, SolutionEpicsUpdater updater) { _verifier = verifier; _updater = updater; }
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; }
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; }
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; }
public UpdateImplementationTimescalesExecutor(SolutionVerifier verifier, SolutionImplementationTimescalesUpdater updater) { this.verifier = verifier; this.updater = updater; }
public UpdateSolutionSupplierExecutor(SolutionVerifier verifier, SolutionSupplierPartialUpdater updater) { this.verifier = verifier; this.updater = updater; }
public UpdateCapabilitiesExecutor(SolutionVerifier verifier, SolutionCapabilitiesUpdater updater) { this.verifier = verifier; this.updater = updater; }
public UpdateRoadMapExecutor(SolutionVerifier verifier, SolutionRoadMapUpdater updater) { this.verifier = verifier; this.updater = updater; }