publicclassStartup{publicvoidConfigureServices(IServiceCollectionservices){varservice=MagicOnionEngine.BuildServerServiceDefinition(newAssembly[]{Assembly.GetAssembly(typeof(MyFirstService))},newMagicOnionOptions(true){MagicOnionLogger=newMagicOnionLogToGrpcLogger()});// Add MagicOnionServiceDefinition for reference from Startup.services.Add(newServiceDescriptor(typeof(MagicOnionServiceDefinition),service));}publicvoidConfigure(IApplicationBuilderapp,IHostingEnvironmentenv){if(env.IsDevelopment()){app.UseDeveloperExceptionPage();}varmagicOnion=app.ApplicationServices.GetService<MagicOnionServiceDefinition>();varxmlPath=Path.Combine(AppContext.BaseDirectory,"MagicOnionInDocker.ServiceDefinition.xml");app.UseMagicOnionSwagger(magicOnion.MethodHandlers,newMagicOnion.HttpGateway.Swagger.SwaggerOptions("MagicOnionInDocker.Server","Swagger Integration Test","/"){XmlDocumentPath=xmlPath});app.UseMagicOnionHttpGateway(magicOnion.MethodHandlers,newChannel("localhost:12345",ChannelCredentials.Insecure));}}