You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search ocelot.json files in given directory and all subdirectories.
Actual Behavior / Motivation for New Feature
Currently AddOcelot only enumerates files in top directory only.
I would like to add even more structure to my ocelot files and keep them as small and maintainable as possible.
Steps to Reproduce the Problem
Only one piece of code would need to be changed in: Ocelot.DependencyInjection.ConfigurationBuilderExtensions.AddOcelot(this IConfigurationBuilder builder, string folder, IWebHostEnvironment env)
starting at line 37:
var files = new DirectoryInfo(folder) .EnumerateFiles("*", SearchOption.AllDirectories)
.Where(fi => reg.IsMatch(fi.Name) && (fi.Name != excludeConfigName))
.ToList();
Specifications
Version: 14.0.9
The text was updated successfully, but these errors were encountered:
@christoff85 Hi Krzysztof!
Thanks for your interest in Ocelot!
Soon you will be able to do everything in Ocelot core services, add/remove services from DI.
We will have Custom MVC Builder feature soon: #1655
Also we will have Ocelot config file extensions in linked #1569 where you will be able to load Ocelot configuration from memory being constructed it as you wish, read from anywhere, including reading file from everywhere.
Also, you can hack current AddOcelot by specifying string folder param you want during Ocelot startup! So you can traverse the directory tree as you wish.
…ration construction (#1569)
* Added AddOcelot Configbuilder Overload
Added an AddOcelot overload to load FileConfiguration directly from the application, so that all the routes could be made configurable and could be load from anywhere.
* Code review changes
* Added unit tests for ConfigurationBuilder AddOcelot method overload
* code review
* CA1816 Change ConfigurationReloadTests.Dispose() to call GC.SuppressFinalize(object). This will prevent derived types that introduce a finalizer from needing to re-implement 'IDisposable' to call it.
* SYSLIB1045 Use 'GeneratedRegexAttribute' to generate the regular expression implementation at compile-time.
* SA1601 Partial elements should be documented
* Add developer's XML-docs
---------
Co-authored-by: raman-m <[email protected]>
raman-m
added
the
merged
Issue has been merged to dev and is waiting for the next release
label
Sep 23, 2023
Expected Behavior / New Feature
Search ocelot.json files in given directory and all subdirectories.
Actual Behavior / Motivation for New Feature
Currently AddOcelot only enumerates files in top directory only.
I would like to add even more structure to my ocelot files and keep them as small and maintainable as possible.
Steps to Reproduce the Problem
Only one piece of code would need to be changed in:
Ocelot.DependencyInjection.ConfigurationBuilderExtensions.AddOcelot(this IConfigurationBuilder builder, string folder, IWebHostEnvironment env)
starting at line 37:
var files = new DirectoryInfo(folder)
.EnumerateFiles("*", SearchOption.AllDirectories)
.Where(fi => reg.IsMatch(fi.Name) && (fi.Name != excludeConfigName))
.ToList();
Specifications
The text was updated successfully, but these errors were encountered: