예제 #1
0
 private static InstructionGenerator <Instruction> .TryGetDelegate[] GetInstructionDelegatesFrom(InstructionCarGenerator.TryGetDelegateWithLanguageReference[] tryGetDelegates, ILanguageReference languageReference)
 {
     InstructionGenerator <Instruction> .TryGetDelegate[] tryGetDelegateArray = new InstructionGenerator <Instruction> .TryGetDelegate[tryGetDelegates.Length];
     for (int index = 0; index < tryGetDelegateArray.Length; ++index)
     {
         tryGetDelegateArray[index] = InstructionCarGenerator.GetInstructionDelegateFrom(tryGetDelegates[index], languageReference);
     }
     return(tryGetDelegateArray);
 }
예제 #2
0
        public static List <Instruction> Generate(Route route, ILanguageReference languageReference)
        {
            InstructionCarGenerator instructionCarGenerator = new InstructionCarGenerator(route, languageReference);

            instructionCarGenerator.Run();
            if (instructionCarGenerator.HasSucceeded)
            {
                return(instructionCarGenerator.Instructions);
            }
            return(new List <Instruction>());
        }
예제 #3
0
 public InstructionCarGenerator(Route route, ILanguageReference languageReference, InstructionCarGenerator.TryGetDelegateWithLanguageReference[] getInstructionDelegates)
     : base(route, InstructionCarGenerator.GetInstructionDelegatesFrom(getInstructionDelegates, languageReference))
 {
 }