Beispiel #1
0
 public BibaMiddleware(RequestDelegate next, BibaCompiler compiler, BibaViewEngineProperties props, IBibaRouter router)
 {
     _compiler = compiler;
     _next     = next;
     _props    = props;
     _router   = router;
 }
Beispiel #2
0
 public BibaRouter(Routes routes, BibaCompiler compiler, IServiceProvider provider,
                   RouterData data, CurrentRoute currentRoute)
 {
     _routes           = routes;
     _compiler         = compiler;
     _provider         = provider;
     _data             = data;
     _currentRoute     = currentRoute;
     _contractResolver = new CamelCasePropertyNamesContractResolver();
 }
Beispiel #3
0
        public Component(BibaCompiler bibaCompiler)
        {
            _compiler = bibaCompiler;

            var fileLocation = Directory.GetFiles("Client", $"{GetType().Name}.html",
                                                  SearchOption.AllDirectories).FirstOrDefault();

            if (fileLocation != null)
            {
                using (var stream = File.OpenText(fileLocation))
                {
                    Template = stream.ReadToEnd();
                }
            }
        }
Beispiel #4
0
 public ForComponent(BibaCompiler bibaCompiler)
     : base(bibaCompiler)
 {
     PreventDefaults = true;
 }
Beispiel #5
0
 public BibaRouter(Routes routes, BibaCompiler compiler, IServiceProvider services)
 {
     _routes   = routes;
     _compiler = compiler;
     _provider = services;
 }