/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v2.0.3-alpha
src/OneScript.Native/Extensions/ServiceRegistrationExtensions.cs
35 строк
1 KB
EvilBeaver
Разделение типов рантайма по модулям
22 ноя 2021, 23:43
22 ноя 2021, 23:43
c528ba4
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using System; using OneScript.DependencyInjection; using OneScript.Execution; using OneScript.Language.SyntaxAnalysis; using OneScript.Native.Compiler; namespace OneScript.Native.Extensions { public static class ServiceRegistrationExtensions { public static IServiceDefinitions UseNativeRuntime(this IServiceDefinitions services) { services.RegisterEnumerable<IDirectiveHandler, NativeRuntimeAnnotationHandler>(); services.RegisterEnumerable<IExecutorProvider, NativeExecutorProvider>(); return services; } } public class NativeExecutorProvider : IExecutorProvider { public Type SupportedModuleType => typeof(DynamicModule); public Invoker GetInvokeDelegate() { throw new NotImplementedException(); } } }