/// <summary> /// Initializes a new instance of the <see cref="GeneticSharp.Domain.Fitnesses.FitnessException"/> class. /// </summary> /// <param name="fitness">The fitness where occurred the error.</param> /// <param name="message">The error message.</param> /// <param name="innerException">Inner exception.</param> public FitnessException(IFitness fitness, string message, Exception innerException) : base("{0}: {1}".With(fitness != null ? fitness.GetType().Name : String.Empty, message), innerException) { Fitness = fitness; }
/// <summary> /// Compiles brainfuck code into an executable. /// </summary> /// <param name="program">Brainfuck source code</param> /// <param name="pathName">Executable file path</param> /// <param name="fitness">IFitness</param> /// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param> public static void Compile(string program, string pathName, IFitness fitness, bool includeHeader = true) { Compile(program, pathName, fitness.GetType().Name, fitness.GetConstructorParameters()); }
/// <summary> /// Initializes a new instance of the <see cref="GeneticSharp.Domain.Fitnesses.FitnessException"/> class. /// </summary> /// <param name="fitness">The fitness where occurred the error.</param> /// <param name="message">The error message.</param> /// <param name="innerException">Inner exception.</param> public FitnessException(IFitness fitness, string message, Exception innerException) : base("{0}: {1}".With(fitness != null ? fitness.GetType().Name : String.Empty, message), innerException) { Fitness = fitness; }
/// <summary> /// Compiles brainfuck code into an executable. /// </summary> /// <param name="program">Brainfuck source code</param> /// <param name="pathName">Executable file path</param> /// <param name="fitness">IFitness</param> /// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param> public static void Compile(string program, string pathName, IFitness fitness, bool includeHeader = true) { Compile(program, pathName, fitness.GetType().Name, fitness.GetConstructorParameters()); }