parent
db4bc781d1
commit
2095a8d1d6
|
|
@ -1,27 +1,19 @@
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Infrastructure.Helpers;
|
using Infrastructure.Helpers;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NUnit.Framework;
|
|
||||||
using OpenAuth.Repository.Domain;
|
using OpenAuth.Repository.Domain;
|
||||||
using Quartz;
|
using Quartz;
|
||||||
|
|
||||||
namespace OpenAuth.App.ServiceApp.Job;
|
namespace OpenAuth.App.ServiceApp.Job;
|
||||||
|
|
||||||
class FileMonitor
|
class FileMonitor: IJob
|
||||||
{
|
{
|
||||||
[Test]
|
public async System.Threading.Tasks.Task Execute(IJobExecutionContext context)
|
||||||
public async System.Threading.Tasks.Task Execute()
|
|
||||||
{
|
{
|
||||||
var builder = new ConfigurationBuilder()
|
|
||||||
.SetBasePath("D:\\vs\\project_git\\Infrastructure\\OpenAuth.WebApi")
|
|
||||||
.AddJsonFile("appsettings.json");
|
var targetDirectory = ConfigHelper.GetConfigRoot().GetSection("Insight:Dir").Value;
|
||||||
// 构建配置
|
var tifExtensions = new[] { ".tif", ".tfw", ".ovr", ".aux"};
|
||||||
var configuration = builder.Build();
|
|
||||||
// 目标目录
|
|
||||||
var targetDirectory = configuration.GetSection("Insight:Dir").Value;
|
|
||||||
//var targetDirectory = ConfigHelper.GetConfigRoot().GetSection("Insight:Dir").Value;
|
|
||||||
var tifExtensions = new[] { ".tif", ".tfw", ".ovr", ".aux", ".xml" };
|
|
||||||
// 相关文件扩展名
|
// 相关文件扩展名
|
||||||
var shpExtensions = new[] { ".shp", ".shx", ".dbf", ".prj", ".cpg" };
|
var shpExtensions = new[] { ".shp", ".shx", ".dbf", ".prj", ".cpg" };
|
||||||
var targetExtensions = new[] { ".tif", ".shp" };
|
var targetExtensions = new[] { ".tif", ".shp" };
|
||||||
|
|
@ -215,4 +207,5 @@ class FileMonitor
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue