예제 #1
0
 protected Context()
 {
     // tables
     _functions = new RoutinesTable();
     _types     = new TypesTable();
     _statics   = new object[StaticIndexes.StaticsCount];
     _constants = ConstsMap.Create(this);
     _scripts   = ScriptsMap.Create();
 }
예제 #2
0
        /// <summary>
        /// Initializes instance of context.
        /// </summary>
        /// <param name="services">Service provider. Can be <c>null</c> reference to use implicit services.</param>
        protected Context(IServiceProvider services)
        {
            _services = services;

            // tables
            _functions = new RoutinesTable();
            _types     = new TypesTable();
            _statics   = Array.Empty <object>();
            _constants = ConstsMap.Create(this);
            _scripts   = ScriptsMap.Create();
        }