Ejemplo n.º 1
0
        public async Task Initialize()
        {
            var converter = new DelegateToAssemblyConverter();
            var assembly  = converter.CreateAssembly(_multicastDelegate, _options);

            var options = new AssemblyPluginCatalogOptions()
            {
                PluginNameOptions = _options.NameOptions
            };

            if (_options.Tags?.Any() == true)
            {
                options.TypeFinderOptions = new TypeFinderOptions
                {
                    TypeFinderCriterias = new List <TypeFinderCriteria> {
                        TypeFinderCriteriaBuilder.Create().Tag(_options.Tags.ToArray())
                    }
                };
            }

            _catalog = new AssemblyPluginCatalog(assembly, options);
            await _catalog.Initialize();

            IsInitialized = true;
        }
Ejemplo n.º 2
0
        public async Task Initialize()
        {
            var converter = new DelegateToAssemblyConverter();
            var assembly  = converter.CreateAssembly(_multicastDelegate, _options);

            var options = new AssemblyPluginCatalogOptions()
            {
                PluginNameOptions = _options.NameOptions
            };

            _catalog = new AssemblyPluginCatalog(assembly, options);
            await _catalog.Initialize();

            IsInitialized = true;
        }