Ejemplo n.º 1
0
 public void Build(IServiceCollection services)
 {
     MainContainerFactory.Setup(services)
     .Config()
     .SetupLocalCache()
     .Splitter()
     .Validate();
 }
        public ActualWordsHandler(POSTaggerType type)
        {
            var factory = MainContainerFactory.Setup(new ServiceCollection())
                          .Config(configuration =>
            {
                var resources     = configuration.GetConfiguration("Resources");
                var resourcesPath = Path.Combine(TestContext.CurrentContext.TestDirectory, resources);
                configuration.SetConfiguration("Resources", resourcesPath);
            })
                          .Splitter(type)
                          .SetupNullCache();

            container = factory.Create();
            Container = container.StartSession();
            Loader    = new DocumentLoader(Container);
        }
        public ActualWordsHandler(POSTaggerType type)
        {
            var factory = MainContainerFactory.Setup(new ServiceCollection())
                          .Config()
                          .Splitter(type, true)
                          .AddNER(
                new DictionaryNERResolver(
                    new Dictionary <string, string>
            {
                { "XXX", "XXX" }
            }))
                          .SetupNullCache();

            container = factory.Create();
            Container = container.StartSession();
            Loader    = new DocumentLoader(Container);
        }
Ejemplo n.º 4
0
        public TestHelper(string server = "192.168.0.70", int port = 6373)
        {
            IServiceCollection service = new ServiceCollection();

            service.RegisterModule(new RedisServerModule(new RedisConfiguration(server, port)
            {
                ServiceName = "Wikiled"
            }));
            service.AddSingleton <AmazonRepository>();

            container = MainContainerFactory
                        .Setup(service)
                        .SetupLocalCache()
                        .Config(item => item.SetConfiguration("resources", Path.Combine(TestContext.CurrentContext.TestDirectory, ConfigurationManager.AppSettings["resources"])))
                        .Splitter()
                        .Create();

            Reset();
        }
Ejemplo n.º 5
0
        public TestHelper(string server = "192.168.0.70", int port = 6373)
        {
            IServiceCollection service = new ServiceCollection();

            service.RegisterModule(new RedisServerModule(new RedisConfiguration(server, port)
            {
                ServiceName = "Wikiled"
            }));
            service.AddSingleton <AmazonRepository>();

            container = MainContainerFactory
                        .Setup(service)
                        .SetupLocalCache()
                        .Config()
                        .Splitter()
                        .Create();

            Reset();
        }