[ https://issues.apache.org/jira/browse/LUCENENET-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097644#comment-16097644
]
ASF GitHub Bot commented on LUCENENET-565:
------------------------------------------
Github user NightOwl888 commented on the issue:
https://github.com/apache/lucenenet/pull/209
Hi Jens,
Before I give this a proper review, I would like to try to plug this into an AspNetCore
app to see if I can get it to work. Could you provide some instructions to how to plug this
in?
I would expect there to be an extension method for `IHostingEnvironment` or `IApplicationBuilder`
so it could be added to the application:
```c#
public class Startup
{
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
Configuration = builder.Build();
}
public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to
the container.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
}
// This method gets called by the runtime. Use this method to configure the HTTP
request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory
loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseMvc();
}
}
```
For example `services.AddLuceneReplicator()` or `app.UseLuceneReplicator()`. I would also
expect it to configure the default routing to act as a server, since out of the box it should
use the same URL scheme as Lucene's replicator.
Maybe what we have here is a lower level bare-bones component which we will also need,
but it feels like the additional steps to get from here to a working app need to be simplified
(or at the very least documented).
> Port Lucene.Net.Replicator
> --------------------------
>
> Key: LUCENENET-565
> URL: https://issues.apache.org/jira/browse/LUCENENET-565
> Project: Lucene.Net
> Issue Type: Task
> Components: Lucene.Net.Replicator
> Affects Versions: Lucene.Net 4.8.0
> Reporter: Shad Storhaug
> Priority: Minor
> Labels: features
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
|