Пример #1
0
        public static BuildFunc UseGuardianDashboard(this BuildFunc builder, GuardianOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            GuardianOptionsFactory.RegisterOptionsFactory(() => options);
            GuardianRouter.BuildRoutes(ReflectionHelper.GetExecutingAssembly());

            builder(_ => UseGuardianDashboard());

            return(builder);
        }
Пример #2
0
 public GuardianRouterTests()
 {
     GuardianRouter.BuildRoutes(typeof(GuardianRouterTests).Assembly);
 }