Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
何阳
/
CaptureAgent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
10ff1887
authored
Dec 19, 2023
by
何阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加版本号
parent
97f9c6a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
FtpAgent/FtpAgent.csproj
FtpAgent/Program.cs
FtpAgent/FtpAgent.csproj
View file @
10ff1887
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net7.0
-windows
</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Nullable>enable</Nullable>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</PropertyGroup>
</PropertyGroup>
...
...
FtpAgent/Program.cs
View file @
10ff1887
...
@@ -7,11 +7,22 @@ using FubarDev.FtpServer;
...
@@ -7,11 +7,22 @@ using FubarDev.FtpServer;
using
FubarDev.FtpServer.FileSystem.DotNet
;
using
FubarDev.FtpServer.FileSystem.DotNet
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.DependencyInjection
;
using
Serilog
;
using
Serilog
;
using
System.Reflection
;
HashSet
<
string
>
FileChangeCnt
=
new
();
HashSet
<
string
>
FileChangeCnt
=
new
();
Logging
.
InitLogging
();
Logging
.
InitLogging
();
Log
.
Information
(
$"FTP Agent 启动"
);
var
config
=
new
Config
(
"config.ini"
);
var
config
=
new
Config
(
"config.ini"
);
// 获取当前程序集
Assembly
assembly
=
Assembly
.
GetExecutingAssembly
();
// 获取版本信息
Version
version
=
assembly
.
GetName
().
Version
;
string
informationalVersion
=
assembly
.
GetCustomAttribute
<
AssemblyInformationalVersionAttribute
>().
InformationalVersion
;
Log
.
Information
(
$"程序版本:
{
informationalVersion
}
"
);
Log
.
Information
(
$"Customer Name:
{
config
.
CustomerName
}
"
);
Log
.
Information
(
$"Customer Name:
{
config
.
CustomerName
}
"
);
Log
.
Information
(
$"Device No:
{
config
.
DeviceNo
}
"
);
Log
.
Information
(
$"Device No:
{
config
.
DeviceNo
}
"
);
Log
.
Information
(
$"OCR Type:
{
config
.
OcrType
}
"
);
Log
.
Information
(
$"OCR Type:
{
config
.
OcrType
}
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment