public LicensedTypes(ILicenseReader licenseReader, IKiss4WebAssemblies kiss4WebAssemblies) { Modules = licenseReader.GetLicensedModules().ToList(); var licensedModuleName = Modules .Select(mod => mod.GetAttribute <ModuleAttribute, KissModul>()?.ModuleName ?? $"Kiss4Web.Modules.{mod}") .ToList(); var assemblyNames = kiss4WebAssemblies.AssemblyNames .Where(asn => licensedModuleName.Contains(asn.Name) || asn.Name.StartsWith("Kiss4Web.Infrastructure.") || asn.Name == "Kiss4Web") .ToList(); var licensedAssemblies = assemblyNames.Select(LoadAssembly).Where(asm => asm != null).ToList(); Types = licensedAssemblies.SelectMany(ass => ass.ExportedTypes).ToList(); Assemblies = licensedAssemblies; }
public void setLicense(ILicenseReader lic) { this.license = lic; }
public LicensedModulesController(ILicenseReader licenseReader) { _licenseReader = licenseReader; }