コード例 #1
0
        public void SetupScanner()
        {
            _database = A.Fake <IGraphDatabase>();

            var config = new ReflectionScannerConfiguration {
                Assemblies = new[] { AssemblyPath }
            };

            _scanner = new ReflectionScanner(config, ModelFactory, _database, A.Fake <ILogger <ReflectionScanner> >());
        }
コード例 #2
0
        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>();
        }
コード例 #3
0
        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> >());
        }
コード例 #4
0
 private void ConfigureScanner(ReflectionScannerConfiguration config)
 {
     _config.GetSection("Scanner:Dotnet").Bind(config);
 }