Ejemplo n.º 1
0
 public CoreServicesLog(ILogger logger,
                        IServiceProvider services,
                        ICompositeAppBuilder builder)
 {
     _logger   = logger ?? throw new ArgumentNullException(nameof(logger));
     _services = services ?? throw new ArgumentNullException(nameof(services));
     _builder  = builder ?? throw new ArgumentNullException(nameof(builder));
 }
Ejemplo n.º 2
0
        public CompositeAppLog(ICompositeAppBuilder application, IServiceCollection services)
        {
            _application = application ?? throw new ArgumentNullException(nameof(application),
                                                                          "Composite Application to log cannot be null.");

            _services = services ?? throw new ArgumentNullException(nameof(services),
                                                                    "Service collection to log cannot be null.");
        }
Ejemplo n.º 3
0
        public ModuleContext(ICompositeAppBuilder builder, IPlugin plugin)
        {
            _builder = builder ?? throw new ArgumentNullException(nameof(builder));

            Plugin  = plugin ?? throw new ArgumentNullException(nameof(plugin));
            AppHost = builder.HostPlugin;

            AllPluginTypes    = FilteredTypesByPluginType(builder, plugin);
            AllAppPluginTypes = GetAppPluginTypes(builder);
        }
Ejemplo n.º 4
0
        private static IEnumerable <Type> FilteredTypesByPluginType(ICompositeAppBuilder builder, IPlugin plugin)
        {
            // Core plug-in can access types from all other plug-in types.
            if (plugin.PluginType == PluginTypes.CorePlugin)
            {
                return(builder.GetPluginTypes());
            }

            // Application centric plug-in can only access types contained in
            // other application plugs.
            return(GetAppPluginTypes(builder));
        }
Ejemplo n.º 5
0
        public CompositeApp(
            ICompositeAppBuilder builder,
            IServiceProvider serviceProvider,
            ILogger <CompositeApp> logger)
        {
            Instance  = this;
            IsStarted = false;

            _builder         = builder ?? throw new ArgumentNullException(nameof(builder));
            _serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
            _logger          = logger ?? throw new ArgumentNullException(nameof(logger));

            HostPlugin = new PluginSummary(builder.HostPlugin);
        }
Ejemplo n.º 6
0
 private static IEnumerable <Type> GetAppPluginTypes(ICompositeAppBuilder builder)
 {
     return(builder.GetPluginTypes(PluginTypes.ApplicationPlugin, PluginTypes.HostPlugin));
 }