예제 #1
0
 /// <summary>
 /// Initialize a new instance of the <see cref="InteractiveContext"/> class using the specified parameters.
 /// </summary>
 /// <param name="memory">The variable memory used by the context.</param>
 /// <param name="memoryCreator">The variable memory creator used by the context.</param>
 /// <param name="objectCreator">The object creator used by the context.</param>
 /// <param name="operators">The calculater containing the operators used by the context.</param>
 /// <param name="console">The console used by the context.</param>
 /// <exception cref="ArgumentNullException">The parameter is <see langword="null"/>.</exception>
 public InteractiveContext(
     IVariableMemory memory,
     IMemoryCreator memoryCreator,
     IObjectCreator objectCreator,
     IOperatorCalculator operators,
     IConsole console)
     : base(memory, memoryCreator, objectCreator, operators)
 {
     Console = console;
 }
예제 #2
0
 /// <summary>
 /// Initialize a new instance of the <see cref="RuntimeContext"/> class using the specified parameters.
 /// </summary>
 /// <param name="memory">The variable memory used by the context.</param>
 /// <param name="memoryCreator">The variable memory creator used by the context.</param>
 /// <param name="objectCreator">The object creator used by the context.</param>
 /// <param name="operators">The calculater containing the operators used by the context.</param>
 /// <exception cref="ArgumentNullException">The parameter is <see langword="null"/>.</exception>
 public RuntimeContext(
     IVariableMemory memory,
     IMemoryCreator memoryCreator,
     IObjectCreator objectCreator,
     IOperatorCalculator operators)
 {
     if (memory == null ||
         memoryCreator == null ||
         objectCreator == null ||
         operators == null)
     {
         throw new ArgumentNullException();
     }
     MemoryCreator = memoryCreator;
     Memory        = memory;
     ObjectCreator = objectCreator;
     Operators     = operators;
 }