private IEnumerable <Type> GetMessageTypes()
        {
            //messages and commands can be sent ONLY
            var messageTypes = assemblyScanner.Scan(conventions.Messages)
                               .Concat(assemblyScanner.Scan(conventions.Commands));

            return(messageTypes);
        }
Beispiel #2
0
 private void EnsureTypes()
 {
     if (_TypeFinder == null)
     {
         _TypeFinder = _RenderingTypeFinderSettings.AssemblyScannerFactory();
         _TypeFinder.Scan(_RenderingTypeFinderSettings.AssembliesToScan, _RenderingTypeFinderSettings.TypesToFind);
     }
 }
Beispiel #3
0
        public IEnumerable <Type> Scan()
        {
            var startups = assemblyScanner
                           .Scan()
                           .Where(type => type.IsAbstract == false && type.IsClass && typeof(ICronusStartup).IsAssignableFrom(type))
                           .OrderBy(type => GetCronusStartupRank(type));

            return(startups);
        }
Beispiel #4
0
        public void Generate(params Assembly[] assemblies)
        {
            var scanResult = _assemblyScanner.Scan(assemblies);
            var model      = _converter.Convert(scanResult);
            var json       = JsonSerializer.Serialize(model, new JsonSerializerOptions {
                WriteIndented = true
            });

            var count    = Directory.GetFiles(_path).Length;
            var fileName = $"documentation.v{count + 1}.json";

            var fullPath = Path.Combine(_path, fileName);

            File.WriteAllText(fullPath, json);
        }