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