File tree Expand file tree Collapse file tree 2 files changed +1
-66
lines changed Expand file tree Collapse file tree 2 files changed +1
-66
lines changed Original file line number Diff line number Diff line change 11using Microsoft . Extensions . DependencyInjection ;
22using Serilog . Ui . Core ;
3- using Serilog . Ui . Web . Filters ;
43using System ;
54using System . Linq ;
65
76namespace Serilog . Ui . Web
87{
98 public static class ServiceCollectionExtensions
109 {
11- public static IServiceCollection AddSerilogUi (
12- this IServiceCollection services ,
13- Action < SerilogUiOptionsBuilder > optionsBuilder
14- )
10+ public static IServiceCollection AddSerilogUi ( this IServiceCollection services , Action < SerilogUiOptionsBuilder > optionsBuilder )
1511 {
1612 if ( services == null )
1713 throw new ArgumentNullException ( nameof ( services ) ) ;
@@ -22,24 +18,10 @@ Action<SerilogUiOptionsBuilder> optionsBuilder
2218 var builder = new SerilogUiOptionsBuilder ( services ) ;
2319 optionsBuilder . Invoke ( builder ) ;
2420
25- //var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(a => a.FullName.StartsWith("Serilog.Ui.Web")).ToList();
26- //foreach (var assembly in assemblies)
27- //{
28- // if (assembly.FullName.Contains("Views"))
29- // mvcBuilder.PartManager.ApplicationParts.Add(new CompiledRazorAssemblyPart(assembly));
30- // else
31- // {
32- // mvcBuilder.PartManager.ApplicationParts.Add(new AssemblyPart(assembly));
33- // var manifestResourceNames = assembly.GetManifestResourceNames();
34- // }
35- //}
36-
3721 var isAuthorizationFilterExist = services . Any ( s => s . ServiceType . FullName == typeof ( AuthorizationOptions ) . FullName ) ;
3822 if ( ! isAuthorizationFilterExist )
3923 services . AddScoped < AuthorizationOptions > ( ) ;
4024
41- services . AddScoped < AuthorizationFilter > ( ) ;
42-
4325 return services ;
4426 }
4527 }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments