internal protected virtual void ScanningClass() { var als = AppDomain.CurrentDomain.GetAssemblies(); WebRuntime.Register(typeof(Reflection).Assembly); foreach (var a in als) { var mpps = a.GetCustomAttributes(typeof(MappingAttribute), false); if (mpps.Length > 0) { WebRuntime.Register(a); } } var assemblies = new List <Assembly>(); foreach (string dll in Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.dll", SearchOption.TopDirectoryOnly)) { try { var assembly = Assembly.LoadFile(dll); var mpps = assembly.GetCustomAttributes(typeof(MappingAttribute), false); if (mpps.Length > 0) { WebRuntime.Register(assembly); } } catch { } } }
protected override IRuntime GetRuntime() { var logger = SerilogLogger.CreateWithDefaultConfiguration(); var runtime = new WebRuntime(this, logger, GetMainDom(logger)); return(runtime); }