public void SetupScanner() { _database = A.Fake <IGraphDatabase>(); var config = new ReflectionScannerConfiguration { Assemblies = new[] { AssemblyPath } }; _scanner = new ReflectionScanner(config, ModelFactory, _database, A.Fake <ILogger <ReflectionScanner> >()); }
public static void AddDotnetScanner(this IServiceCollection services, Action <ReflectionScannerConfiguration> configure) { var config = new ReflectionScannerConfiguration(); configure(config); services.AddSingleton(config); services.AddTransient <IScanner, ReflectionScanner>(); services.AddTransient <IModelFactory, ModelFactory>(); }
public void SetupScanner() { _tx = A.Fake <IGraphDatabaseTransaction>(); var database = A.Fake <IGraphDatabase>(); A.CallTo(() => database.BeginTransaction()).Returns(_tx); var config = new ReflectionScannerConfiguration { Assemblies = new[] { AssemblyPath } }; _scanner = new ReflectionScanner(config, ModelFactory, database, A.Fake <ILogger <ReflectionScanner> >()); }
private void ConfigureScanner(ReflectionScannerConfiguration config) { _config.GetSection("Scanner:Dotnet").Bind(config); }