Example #1
0
 public BibaMiddleware(RequestDelegate next, BibaCompiler compiler, BibaViewEngineProperties props, IBibaRouter router)
 {
     _compiler = compiler;
     _next     = next;
     _props    = props;
     _router   = router;
 }
Example #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();
 }
Example #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();
                }
            }
        }
Example #4
0
 public ForComponent(BibaCompiler bibaCompiler)
     : base(bibaCompiler)
 {
     PreventDefaults = true;
 }
Example #5
0
 public BibaRouter(Routes routes, BibaCompiler compiler, IServiceProvider services)
 {
     _routes   = routes;
     _compiler = compiler;
     _provider = services;
 }