Skip to content

SetModuleNameFilterPattern

Patrick edited this page Oct 19, 2016 · 6 revisions

While a Nugety catalog may contain many modules, it's possible to restrict the modules loaded by settig a filter pattern using the FileNameFilterPattern property.

Sample Code

In the following sample, Nugety will only discover modules which contain the word "Development".

var modules = new NugetyCatalog()
    .Options.SetModuleNameFilterPattern("*Development*")
    .FromDirectory()
    .GetModules<IModuleInitializer>().Load();
Clone this wiki locally