示例#1
0
        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;
        }
示例#2
0
 public void setLicense(ILicenseReader lic)
 {
     this.license = lic;
 }
示例#3
0
 public LicensedModulesController(ILicenseReader licenseReader)
 {
     _licenseReader = licenseReader;
 }