Exemplo n.º 1
0
 public override void Register(IServiceCollection services) => AssemblyQueries
 .GetShinyAssemblies()
 .SelectMany(x => x.GetCustomAttributes(true))
 .Where(x => !x.GetType().IsAbstract)
 .OfType <AutoRegisterAttribute>()
 .ToList()
 .ForEach(x => x.Register(services));
Exemplo n.º 2
0
 static void EnsureTypeCache()
 {
     typeCache ??= AssemblyQueries
     .GetAssumedUserTypes()
     .Where(typeof(IShinyDelegate).IsAssignableFrom)
     .ToList();
 }
Exemplo n.º 3
0
        public AssemblyServiceModule(params Assembly[] assemblies)
        {
            if (assemblies == null || assemblies.Length == 0)
            {
                assemblies = AssemblyQueries.GetAssumedUserAssemblies().ToArray();
            }

            this.assemblies = assemblies;
        }