|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Autofac.Extensions.DependencyInjection;
|
|
|
|
|
using AutoMapper;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using VOL.Entity.DomainModels;
|
|
|
|
|
using VOL.Core.Configuration;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace VOL.WebApi
|
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
CreateHostBuilder(args).Build().Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
|
|
|
Host.CreateDefaultBuilder(args)
|
|
|
|
|
.ConfigureWebHostDefaults(webBuilder =>
|
|
|
|
|
{
|
|
|
|
|
webBuilder.ConfigureKestrel(serverOptions =>
|
|
|
|
|
{
|
|
|
|
|
serverOptions.Limits.MaxRequestBodySize = 10485760;
|
|
|
|
|
// Set properties and call methods on options
|
|
|
|
|
DoFirst();
|
|
|
|
|
});
|
|
|
|
|
//webBuilder.UseKestrel().UseUrls("http://*:9991");//Ĭ<>϶˿<CFB6>9991
|
|
|
|
|
var filename = "hostporturl.txt";
|
|
|
|
|
var hosturl = "http://*:9991";
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
using (StreamReader sr = new StreamReader(filename))
|
|
|
|
|
{
|
|
|
|
|
string line;
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ʾ<EFBFBD>У<EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ĩβ
|
|
|
|
|
while ((line = sr.ReadLine()) != null)
|
|
|
|
|
{
|
|
|
|
|
hosturl = line.Trim();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e) {
|
|
|
|
|
FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write);
|
|
|
|
|
|
|
|
|
|
StreamWriter sr = new StreamWriter(fs);
|
|
|
|
|
|
|
|
|
|
sr.WriteLine(hosturl);
|
|
|
|
|
|
|
|
|
|
sr.Close();
|
|
|
|
|
fs.Close();
|
|
|
|
|
}
|
|
|
|
|
webBuilder.UseKestrel().UseUrls(hosturl);
|
|
|
|
|
|
|
|
|
|
webBuilder.UseIIS();
|
|
|
|
|
webBuilder.UseStartup<Startup>();
|
|
|
|
|
}).UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void DoFirst() {
|
|
|
|
|
|
|
|
|
|
////<2F><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>ϸ=><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
//Mapper.Initialize(x => x.CreateMap<VW_OP_WMS_IN_DO_GOODS, OP_WMS_PHYSICS>());
|
|
|
|
|
////<2F><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>ϸ=><3E><><EFBFBD><EFBFBD><EFBFBD>䶯
|
|
|
|
|
//Mapper.Initialize(x => x.CreateMap<VW_OP_WMS_IN_DO_GOODS, Op_Wms_Change>());
|
|
|
|
|
////<2F><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>ϸ=><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䶯
|
|
|
|
|
//Mapper.Initialize(x => x.CreateMap<VW_OP_WMS_IN_DO_GOODS, Op_Wms_Physics_Change>());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Mapper.Initialize(ctx => { });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|