Compare commits

...

10 Commits

Author SHA1 Message Date
0e645d20e2 tmp 2021-11-12 15:00:41 +05:00
78b2f5ac24 Merge branch 'test' of https://git.mbucb.ru/google/ASCKU_PC into test
# Conflicts:
#	.vs/ASCKU Projects/DesignTimeBuild/.dtbcache.v2
#	.vs/ASCKU Projects/v16/.suo
#	ApiServer/obj/Debug/net5.0/ApiServer.csproj.AssemblyReference.cache
#	ClientCollector/obj/Debug/net5.0/ClientCollector.csproj.AssemblyReference.cache
#	DataClient/obj/Release/net5.0/DataClient.csproj.AssemblyReference.cache
#	DataClients/obj/Release/netstandard2.0/DataClients.csproj.AssemblyReference.cache
#	Korp90TimePasport/obj/Debug/netcoreapp3.1/Korp90TimePasport.csproj.AssemblyReference.cache
#	Mailing/obj/Release/netcoreapp3.1/Mailing.csproj.AssemblyReference.cache
#	PrintPDF/PdfSharp.Charting/obj/Release/netstandard2.0/PdfSharp.Charting.csproj.AssemblyReference.cache
#	PrintPDF/PdfSharp/obj/Release/netstandard2.0/PdfSharp.csproj.AssemblyReference.cache
#	SupportClasses/obj/Release/netstandard2.0/SupportClasses.csproj.AssemblyReference.cache
#	Test2/obj/Debug/net5.0/Test2.csproj.AssemblyReference.cache
#	Test2/obj/Release/net5.0/Test2.csproj.AssemblyReference.cache
#	Tests/obj/Debug/netcoreapp3.1/Tests.csproj.AssemblyReference.cache
#	Tests/obj/Release/netcoreapp3.1/Tests.csproj.AssemblyReference.cache
#	test3/obj/Debug/net5.0/test3.csproj.AssemblyReference.cache
#	test3/obj/Release/net5.0/test3.csproj.AssemblyReference.cache
2021-08-06 10:44:55 +05:00
103f8273eb Work 2021-08-06 10:42:03 +05:00
c4438e8a8a Home 2021-08-06 10:39:28 +05:00
900e5d80b3 Finish clientCollector 2021-08-04 08:03:25 +05:00
be22ea0673 Work 2021-08-03 11:34:44 +05:00
76f9ce8a79 sub work 2021-08-03 06:28:06 +05:00
6ba90bf7e5 Send Data 2021-08-02 23:01:18 +05:00
25f8be5f24 home 2021-08-01 22:56:52 +05:00
cffb8a180b Home 2021-08-01 19:48:09 +05:00
693 changed files with 179602 additions and 1028 deletions

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
IIS configuration sections. IIS configuration sections.
@ -171,6 +171,14 @@
<binding protocol="http" bindingInformation="*:16979:localhost" /> <binding protocol="http" bindingInformation="*:16979:localhost" />
</bindings> </bindings>
</site> </site>
<site name="Site" id="4">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="F:\GIT\ASCKU_PC\Site" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:52028:localhost" />
</bindings>
</site>
<siteDefaults> <siteDefaults>
<!-- To enable logging, please change the below attribute "enabled" to "true" --> <!-- To enable logging, please change the below attribute "enabled" to "true" -->
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" /> <logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" />

Binary file not shown.

@ -29,11 +29,30 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test2", "Test2\Test2.csproj
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test3", "test3\test3.csproj", "{33B08224-623E-4120-942E-AAE199CD63A0}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test3", "test3\test3.csproj", "{33B08224-623E-4120-942E-AAE199CD63A0}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{4EB6C7BF-C18D-4C54-8495-E59B971B8197}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiServer", "ApiServer\ApiServer.csproj", "{618EF8A3-70D7-42A8-A407-AA3E47FE184C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiServer", "ApiServer\ApiServer.csproj", "{618EF8A3-70D7-42A8-A407-AA3E47FE184C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientCollector", "ClientCollector\ClientCollector.csproj", "{91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClientCollector", "ClientCollector\ClientCollector.csproj", "{91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site", "Site\", "{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/localhost_52028"
Debug.AspNetCompiler.PhysicalPath = "Site\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_52028\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/localhost_52028"
Release.AspNetCompiler.PhysicalPath = "Site\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_52028\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "52028"
SlnRelativePath = "Site\"
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -289,26 +308,6 @@ Global
{33B08224-623E-4120-942E-AAE199CD63A0}.Release|x64.Build.0 = Release|Any CPU {33B08224-623E-4120-942E-AAE199CD63A0}.Release|x64.Build.0 = Release|Any CPU
{33B08224-623E-4120-942E-AAE199CD63A0}.Release|x86.ActiveCfg = Release|Any CPU {33B08224-623E-4120-942E-AAE199CD63A0}.Release|x86.ActiveCfg = Release|Any CPU
{33B08224-623E-4120-942E-AAE199CD63A0}.Release|x86.Build.0 = Release|Any CPU {33B08224-623E-4120-942E-AAE199CD63A0}.Release|x86.Build.0 = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|ARM.ActiveCfg = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|ARM.Build.0 = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|ARM64.Build.0 = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|x64.ActiveCfg = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|x64.Build.0 = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|x86.ActiveCfg = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Debug|x86.Build.0 = Debug|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|Any CPU.Build.0 = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|ARM.ActiveCfg = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|ARM.Build.0 = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|ARM64.ActiveCfg = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|ARM64.Build.0 = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|x64.ActiveCfg = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|x64.Build.0 = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|x86.ActiveCfg = Release|Any CPU
{4EB6C7BF-C18D-4C54-8495-E59B971B8197}.Release|x86.Build.0 = Release|Any CPU
{618EF8A3-70D7-42A8-A407-AA3E47FE184C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {618EF8A3-70D7-42A8-A407-AA3E47FE184C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{618EF8A3-70D7-42A8-A407-AA3E47FE184C}.Debug|Any CPU.Build.0 = Debug|Any CPU {618EF8A3-70D7-42A8-A407-AA3E47FE184C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{618EF8A3-70D7-42A8-A407-AA3E47FE184C}.Debug|ARM.ActiveCfg = Debug|Any CPU {618EF8A3-70D7-42A8-A407-AA3E47FE184C}.Debug|ARM.ActiveCfg = Debug|Any CPU
@ -349,6 +348,26 @@ Global
{91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}.Release|x64.Build.0 = Release|Any CPU {91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}.Release|x64.Build.0 = Release|Any CPU
{91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}.Release|x86.ActiveCfg = Release|Any CPU {91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}.Release|x86.ActiveCfg = Release|Any CPU
{91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}.Release|x86.Build.0 = Release|Any CPU {91CA0D25-5552-4FC2-B61D-EE0FF35D86BB}.Release|x86.Build.0 = Release|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|ARM.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|ARM64.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|x64.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|x64.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|x86.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Debug|x86.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|Any CPU.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|ARM.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|ARM.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|ARM64.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|ARM64.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|x64.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|x64.Build.0 = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|x86.ActiveCfg = Debug|Any CPU
{41F2077F-FD59-4FDA-B54F-DF327A6DE29D}.Release|x86.Build.0 = Debug|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -4,7 +4,7 @@
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID> <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath> <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<ActiveDebugProfile>ApiServer</ActiveDebugProfile> <ActiveDebugProfile>ApiServer</ActiveDebugProfile>
<NameOfLastUsedPublishProfile>D:\GIT\ASCKU_PC\ApiServer\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>F:\GIT\ASCKU_PC\ApiServer\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor> <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DataClient.Struct;
namespace ApiServer.ApiStruct
{
public class DataCheckApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
}
public class DataCheckClient
{
public bool Status { get; set; }
public bool Exist { get; set; }
public ulong DataSize { get; set; }
}
public class DataCreateApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
public byte[] Struct { get; set; }
}
public class DataCreateClient
{
public bool Status { get; set; }
}
}

@ -6,27 +6,33 @@ using DataClient.Struct;
namespace ApiServer.ApiStruct namespace ApiServer.ApiStruct
{ {
public class PasportCheckRep public class PasportCheckApi
{ {
public bool HasData { get; set; } public bool Status { get; set; }
public DateTime DateAndTime { get; set; } public DateTime DateAndTime { get; set; }
public string Name { get; set; } public string Name { get; set; }
} }
public class PasportCheckReq public class PasportCheckClient
{ {
public bool Status { get; set; } = true; public bool Status { get; set; }
public bool Exist { get; set; } public bool Exist { get; set; }
public ulong PaspSum { get; set; }
}
public class PasportCreateApi
{
public bool Status { get; set; }
public Pasport Pasp { get; set; } public Pasport Pasp { get; set; }
} }
public class PasportCreateRep public class PasportCreateClient
{ {
public bool HasData { get; set; } public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
public Pasport Pasp { get; set; }
} }
public class PasportCreateReq public class PasportGetListApi
{ {
public bool Status { get; set; } = true; public DateTime Date { get; set; }
}
public class PasportGetListClient
{
public string[] Name { get; set; }
} }
} }

@ -0,0 +1,86 @@
using Microsoft.AspNetCore.Mvc;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ApiServer.ApiStruct;
using Newtonsoft.Json;
using System.IO;
namespace ApiServer.Controllers
{
[ApiController, Route("[controller]")]
public class DataController : ControllerBase
{
private Logger log = LogManager.GetCurrentClassLogger();
[HttpPost, Route("check")]
public DataCheckClient Check([FromBody] object value)
{
try
{
var getResult = JsonConvert.DeserializeObject<DataCheckApi>(value.ToString());
if (!getResult.Status || string.IsNullOrEmpty(getResult.Name))
{
log.Warn("Wrong answer.");
return new DataCheckClient();
}
var dataDir = Path.Combine(
Directory.GetCurrentDirectory(),
"data", "data",
getResult.DateAndTime.Year.ToString("D4"),
getResult.DateAndTime.Month.ToString("D2"),
getResult.DateAndTime.Day.ToString("D2"),
getResult.Name);
log.Info("Search data: " + dataDir);
if (!System.IO.File.Exists(dataDir))
{
log.Info("Data not exist: " + dataDir);
return new DataCheckClient { Status = true, Exist = false, DataSize = 0 };
}
var dataArr = System.IO.File.ReadAllBytes(dataDir);
log.Info("Send data size: " + dataArr.Length + " | " + dataDir);
return new DataCheckClient { Status = true, Exist = true, DataSize = (ulong)dataArr.Length };
}
catch (Exception e)
{
log.Warn(e);
return new DataCheckClient();
}
}
[DisableRequestSizeLimit]
[HttpPost, Route("create")]
public DataCreateClient Create([FromBody] object value)
{
try
{
var getResult = JsonConvert.DeserializeObject<DataCreateApi>(value.ToString());
if (!getResult.Status ||
string.IsNullOrEmpty(getResult.Name) ||
getResult.Struct.Length == 0)
{
log.Warn("Wrong answer.");
return new DataCreateClient();
}
var dataDir = Path.Combine(
Directory.GetCurrentDirectory(),
"data", "data",
getResult.DateAndTime.Year.ToString("D4"),
getResult.DateAndTime.Month.ToString("D2"),
getResult.DateAndTime.Day.ToString("D2"));
if (!Directory.Exists(dataDir))
Directory.CreateDirectory(dataDir);
dataDir = Path.Combine(dataDir, getResult.Name);
System.IO.File.WriteAllBytes(dataDir, getResult.Struct);
log.Info("Save data: " + dataDir);
return new DataCreateClient { Status = true };
}
catch (Exception e)
{
log.Warn(e);
return new DataCreateClient();
}
}
}
}

@ -18,63 +18,132 @@ namespace ApiServer.Controllers
public class PasportController : ControllerBase public class PasportController : ControllerBase
{ {
private Logger log = LogManager.GetCurrentClassLogger(); private Logger log = LogManager.GetCurrentClassLogger();
[HttpPost, Route("check")] [HttpPost, Route("check")]
public PasportCheckReq Check([FromBody] object value) public PasportCheckClient Check([FromBody] object value)
{ {
try try
{ {
var reply = JsonConvert.DeserializeObject<PasportCheckRep>(value.ToString()); var getResult = JsonConvert.DeserializeObject<PasportCheckApi>(value.ToString());
if (!reply.HasData || string.IsNullOrEmpty(reply.Name)) throw new Exception(); if (!getResult.Status || string.IsNullOrEmpty(getResult.Name))
{
log.Warn("Wrong answer.");
return new PasportCheckClient();
}
var paspName = var paspName =
reply.DateAndTime.Hour.ToString("D2") + getResult.DateAndTime.Hour.ToString("D2") +
reply.DateAndTime.Minute.ToString("D2") + getResult.DateAndTime.Minute.ToString("D2") +
reply.DateAndTime.Second.ToString("D2") + getResult.DateAndTime.Second.ToString("D2") +
"-" + reply.Name; "-" + getResult.Name;
var paspDir = Path.Combine( var paspDir = Path.Combine(
Directory.GetCurrentDirectory(), Directory.GetCurrentDirectory(),
"data", "pasport", "data", "pasport",
reply.DateAndTime.Year.ToString("D4"), getResult.DateAndTime.Year.ToString("D4"),
reply.DateAndTime.Month.ToString("D2"), getResult.DateAndTime.Month.ToString("D2"),
reply.DateAndTime.Day.ToString("D2"), getResult.DateAndTime.Day.ToString("D2"),
paspName); paspName);
log.Info("Search pasport: " + paspDir);
if (!System.IO.File.Exists(paspDir)) if (!System.IO.File.Exists(paspDir))
return new PasportCheckReq { Status = true, Exist = false }; {
return new PasportCheckReq { Status = true, Exist = true, Pasp = new Pasport(System.IO.File.ReadAllBytes(paspDir)) }; log.Info("Psport not exist: " + paspDir);
return new PasportCheckClient { Status = true, Exist = false, PaspSum = 0 };
}
var pasport = System.IO.File.ReadAllBytes(paspDir);
ulong paspResult = 0;
foreach (var b in pasport)
paspResult += b;
log.Info("Send pasport size: " + paspResult + " | " + paspDir);
return new PasportCheckClient { Status = true, Exist = true, PaspSum = paspResult };
}
catch(Exception e)
{
log.Warn(e);
return new PasportCheckClient();
} }
catch { return new PasportCheckReq { Status = false }; }
} }
[HttpPost, Route("create")] [HttpPost, Route("create")]
public PasportCreateReq Create([FromBody] object value) public PasportCreateClient Create([FromBody] object value)
{ {
try try
{ {
var reply = JsonConvert.DeserializeObject<PasportCreateRep>(value.ToString()); var getResult = JsonConvert.DeserializeObject<PasportCreateApi>(value.ToString());
if (!reply.HasData || string.IsNullOrEmpty(reply.Name)) throw new Exception(); if (!getResult.Status ||
getResult.Pasp == null ||
!getResult.Pasp.HasData)
{
log.Warn("Wrong answer.");
return new PasportCreateClient();
}
var paspName = var paspName =
reply.DateAndTime.Hour.ToString("D2") + getResult.Pasp.dEnd.Value.Hour.ToString("D2") +
reply.DateAndTime.Minute.ToString("D2") + getResult.Pasp.dEnd.Value.Minute.ToString("D2") +
reply.DateAndTime.Second.ToString("D2") + getResult.Pasp.dEnd.Value.Second.ToString("D2") +
"-" + reply.Name; "-" + (string.IsNullOrEmpty(getResult.Pasp.nplav) ?
getResult.Pasp.numVDP.Value.ToString("D2") :
getResult.Pasp.nplav);
var dir = Path.Combine( var dir = Path.Combine(
Directory.GetCurrentDirectory(), Directory.GetCurrentDirectory(),
"data", "pasport", "data", "pasport",
reply.DateAndTime.Year.ToString("D4"), getResult.Pasp.dEnd.Value.Year.ToString("D4"),
reply.DateAndTime.Month.ToString("D2"), getResult.Pasp.dEnd.Value.Month.ToString("D2"),
reply.DateAndTime.Day.ToString("D2")); getResult.Pasp.dEnd.Value.Day.ToString("D2"));
var paspDir = Path.Combine(dir, paspName); var paspDir = Path.Combine(dir, paspName);
if (!Directory.Exists(dir)) if (!Directory.Exists(dir))
Directory.CreateDirectory(dir); Directory.CreateDirectory(dir);
System.IO.File.WriteAllBytes(paspDir, reply.Pasp.PaspByte); System.IO.File.WriteAllBytes(paspDir, getResult.Pasp.PaspByte);
log.Info("Save pasport: " + paspDir);
return new PasportCreateClient { Status = true };
}
catch (Exception e)
{
log.Warn(e);
return new PasportCreateClient();
}
}
return new PasportCreateReq { Status = true }; [HttpPost, Route("getlist")]
public PasportGetListClient GetList([FromBody] object value)
{
try
{
var pasportNameList = new List<string>();
var getResult = JsonConvert.DeserializeObject<PasportGetListApi>(value.ToString());
var pasportDir = Path.Combine(
Directory.GetCurrentDirectory(),
"data",
"pasport",
getResult.Date.Year.ToString("D4"),
getResult.Date.ToString("D2"),
getResult.Date.Day.ToString("D2")
);
if (!Directory.Exists(pasportDir))
return new PasportGetListClient();
var allPasportFiles = Directory.GetFiles(pasportDir);
foreach (var fullPasportName in allPasportFiles)
{
var name = Path.GetFileNameWithoutExtension(fullPasportName);
var pasportParts = name.Split('-');
var pasport = "";
for (var i = 1; i < pasportParts.Length; i++)
{
if (pasport.Length != 0)
pasport += "-";
pasport += pasportParts[i];
} }
catch { return new PasportCreateReq { Status = false }; } pasportNameList.Add(pasport);
} }
log.Info("Send pasport list: " + pasportNameList);
return new PasportGetListClient() { Name = pasportNameList.ToArray() };
}
catch (Exception e)
{
log.Warn(e);
return new PasportGetListClient();
}
}
} }

@ -26,6 +26,13 @@ namespace ApiServer
webBuilder.UseUrls("http://*:64400/"); webBuilder.UseUrls("http://*:64400/");
//webBuilder.UseUrls("http://127.0.0.1:5000/"); //webBuilder.UseUrls("http://127.0.0.1:5000/");
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
webBuilder.UseKestrel(options =>
{
options.Limits.MaxRequestBodySize = long.MaxValue;
options.Limits.MaxRequestBufferSize = long.MaxValue;
options.Limits.MaxRequestLineSize = int.MaxValue;
options.Limits.MaxResponseBufferSize = long.MaxValue;
});
}); });
static void LogConf() static void LogConf()

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<History>True|2021-07-31T12:43:14.2797709Z;False|2021-07-31T17:41:49.3152422+05:00;True|2021-07-31T14:07:45.4057263+05:00;False|2021-07-31T13:53:38.4952669+05:00;</History> <History>True|2021-08-05T17:16:00.1453908Z;True|2021-08-02T21:42:10.4757931+05:00;True|2021-08-01T19:33:24.0605718+05:00;True|2021-08-01T19:29:09.0622642+05:00;True|2021-08-01T16:14:00.2837619+05:00;True|2021-07-31T17:43:14.2797709+05:00;False|2021-07-31T17:41:49.3152422+05:00;True|2021-07-31T14:07:45.4057263+05:00;False|2021-07-31T13:53:38.4952669+05:00;</History>
<_PublishTargetUrl>D:\GIT\ASCKU_PC\ApiServer\bin\Release\</_PublishTargetUrl> <_PublishTargetUrl>F:\GIT\ASCKU_PC\ApiServer\bin\Release\</_PublishTargetUrl>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,11 +1,10 @@
{ {
"runtimeOptions": { "runtimeOptions": {
"additionalProbingPaths": [ "additionalProbingPaths": [
"C:\\Users\\google\\.dotnet\\store\\|arch|\\|tfm|", "C:\\Users\\Admin\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\google\\.nuget\\packages", "C:\\Users\\Admin\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
] ]
} }
} }

@ -1,25 +1,24 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj": {} "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj": {}
}, },
"projects": { "projects": {
"D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj": { "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj",
"projectName": "ApiServer", "projectName": "ApiServer",
"projectPath": "D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\ApiServer\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\ApiServer\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -35,8 +34,8 @@
"net5.0": { "net5.0": {
"targetAlias": "net5.0", "targetAlias": "net5.0",
"projectReferences": { "projectReferences": {
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj" "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj"
} }
} }
} }
@ -78,26 +77,25 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
}, },
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"version": "0.0.3", "version": "0.0.3",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"projectName": "DataClient", "projectName": "DataClient",
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\DataClient\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\DataClient\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -153,7 +151,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
} }

@ -5,15 +5,14 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\google\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Admin\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.10.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.10.0</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\google\.nuget\packages\" /> <SourceRoot Include="C:\Users\Admin\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" />
<SourceRoot Include="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

@ -1 +1 @@
3105bb879a54082cdc433603df634090df709038 0ba5eb43d3c8baaf93d0a30f42372f5107b7f4d6

@ -29,3 +29,34 @@ D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.dll
D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ref\ApiServer.dll D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ref\ApiServer.dll
D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.pdb D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.pdb
D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.genruntimeconfig.cache D:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.genruntimeconfig.cache
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\appsettings.Development.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\appsettings.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ApiServer.exe
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\Config\analog\default.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\Config\config.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ApiServer.deps.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ApiServer.runtimeconfig.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ApiServer.runtimeconfig.dev.json
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ApiServer.dll
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ref\ApiServer.dll
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\ApiServer.pdb
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\Newtonsoft.Json.dll
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\NLog.dll
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\NLog.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\ApiServer\bin\Release\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.csproj.AssemblyReference.cache
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.GeneratedMSBuildEditorConfig.editorconfig
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.AssemblyInfoInputs.cache
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.AssemblyInfo.cs
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.csproj.CoreCompileInputs.cache
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.MvcApplicationPartsAssemblyInfo.cache
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\staticwebassets\ApiServer.StaticWebAssets.Manifest.cache
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\staticwebassets\ApiServer.StaticWebAssets.xml
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\scopedcss\bundle\ApiServer.styles.css
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.RazorTargetAssemblyInfo.cache
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.csproj.CopyComplete
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ref\ApiServer.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.pdb
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\ApiServer.genruntimeconfig.cache

@ -1 +1 @@
0a8c2f7fcebea58b73a53bb1c0a2aa1056202aba b0f840db997650a7593b11f7a1ba44023edfe205

@ -0,0 +1,14 @@
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\Config\analog\default.json
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\Config\config.json
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\ApiServer.exe
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\appsettings.Development.json
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\appsettings.json
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\ApiServer.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\ApiServer.deps.json
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\ApiServer.runtimeconfig.json
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\ApiServer.pdb
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\Newtonsoft.Json.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\NLog.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\NLog.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\DataClient.dll
F:\GIT\ASCKU_PC\ApiServer\obj\Release\net5.0\PubTmp\Out\DataClient.pdb

@ -381,27 +381,25 @@
] ]
}, },
"packageFolders": { "packageFolders": {
"C:\\Users\\google\\.nuget\\packages\\": {}, "C:\\Users\\Admin\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {},
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}, "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
}, },
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj",
"projectName": "ApiServer", "projectName": "ApiServer",
"projectPath": "D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\ApiServer\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\ApiServer\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -417,8 +415,8 @@
"net5.0": { "net5.0": {
"targetAlias": "net5.0", "targetAlias": "net5.0",
"projectReferences": { "projectReferences": {
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj" "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj"
} }
} }
} }
@ -460,7 +458,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
} }

@ -1,19 +1,19 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "hTY5ZT/WYp2p43FfX3KnXAnDiB/J5VtZtww7gAIXsFl9arYKmuE7Kv3LxQJ/AR8R5Z4ajxBuJMpvWXDq7mxwrA==", "dgSpecHash": "c7G+nOZ81H331zux09OXgbP7HT0d7L0fH0RWR7PzDQiuRE4M8wC0X3SJ0DcA3WX51Fx127vns1AXmLvzg6K8jQ==",
"success": true, "success": true,
"projectFilePath": "D:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj", "projectFilePath": "F:\\GIT\\ASCKU_PC\\ApiServer\\ApiServer.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.0\\microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.0\\microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\nlog\\4.7.10\\nlog.4.7.10.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\nlog\\4.7.10\\nlog.4.7.10.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\nlog.extensions.logging\\1.7.2\\nlog.extensions.logging.1.7.2.nupkg.sha512" "C:\\Users\\Admin\\.nuget\\packages\\nlog.extensions.logging\\1.7.2\\nlog.extensions.logging.1.7.2.nupkg.sha512"
], ],
"logs": [] "logs": []
} }

@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog" Version="4.7.10" /> <PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="SharpZipLib" Version="1.3.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

33
ClientCollector/Data.cs Normal file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DataClient.Struct;
namespace ApiServer.ApiStruct
{
public class DataCheckApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
}
public class DataCheckClient
{
public bool Status { get; set; }
public bool Exist { get; set; }
public ulong DataSize { get; set; }
}
public class DataCreateApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
public byte[] Struct { get; set; }
}
public class DataCreateClient
{
public bool Status { get; set; }
}
}

@ -6,27 +6,26 @@ using DataClient.Struct;
namespace ApiServer.ApiStruct namespace ApiServer.ApiStruct
{ {
public class PasportCheckRep public class PasportCheckApi
{ {
public bool HasData { get; set; } public bool Status { get; set; }
public DateTime DateAndTime { get; set; } public DateTime DateAndTime { get; set; }
public string Name { get; set; } public string Name { get; set; }
} }
public class PasportCheckReq public class PasportCheckClient
{ {
public bool Status { get; set; } = true; public bool Status { get; set; }
public bool Exist { get; set; } public bool Exist { get; set; }
public ulong PaspSum { get; set; }
}
public class PasportCreateApi
{
public bool Status { get; set; }
public Pasport Pasp { get; set; } public Pasport Pasp { get; set; }
} }
public class PasportCreateRep public class PasportCreateClient
{ {
public bool HasData { get; set; } public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
public Pasport Pasp { get; set; }
}
public class PasportCreateReq
{
public bool Status { get; set; } = true;
} }
} }

@ -13,6 +13,11 @@ using ApiServer.ApiStruct;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Text; using System.Text;
using System.IO; using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Tar;
using System.Net.Security;
namespace ClientCollector namespace ClientCollector
{ {
@ -24,126 +29,399 @@ namespace ClientCollector
{ {
LogConf(); LogConf();
log.Info("Start Client Collector."); log.Info("Start Client Collector.");
while (true) Task taskPasp = null;
var workPasp = false;
Task taskData = null;
var workData = false;
foreach(var arg in args)
{ {
NETClient nc = new NETClient("10.10.45.152", 1070); if(int.TryParse(arg, out int flag))
try switch (flag)
{ {
log.Info("Get Years."); case 1:
var dir_1lvl = nc.Full_Dir_Browse(); workPasp = true;
foreach (var dir_1lvl_val in dir_1lvl) break;
{ case 2:
if (dir_1lvl_val == "current") continue; workData = true;
log.Info("Get Month of " + dir_1lvl_val + ".");
var dir_2lvl = nc.Full_Dir_Browse(dir_1lvl_val);
foreach (var dir_2lvl_val in dir_2lvl)
{
log.Info("Get Days of " + dir_2lvl_val + ".");
var dir_3lvl = nc.Full_Dir_Browse(dir_2lvl_val);
foreach (var dir_3lvl_val in dir_3lvl)
{
log.Info("Get Pasps of " + dir_3lvl_val + ".");
var pasp_list = nc.Full_Dir_Browse(dir_3lvl_val);
foreach (var pasp_dir in pasp_list)
{
int count = 0;
do
{
try
{
log.Info("Get Pasp " + pasp_dir + ". Try " + (count + 1));
var pasp = nc.Full_Pasp_Download(pasp_dir);
if (pasp.HasData && SendPasport(pasp))
{
log.Info("Send OK.");
break; break;
}
log.Warn("Can't send " + pasp_dir + ".");
Task.Delay(1000 * 60 * 5);
count = 0;
}
catch (Exception e) { log.Warn(e.Message); }
if (nc.Connect())
{
nc.Close();
count++;
}
else
{
log.Warn("Can't connect to STP.");
Task.Delay(1000 * 60 * 5);
count = 0;
}
} while (count < 5);
}
}
} }
} }
while (true) while (true)
{
if (taskPasp == null || taskPasp.IsCompleted)
{
log.Info(workPasp ? "Start Pasport Task." : "Skip Pasport Task.");
taskPasp = workPasp ? WorkPasport() : Task.Delay(int.MaxValue);
}
if (taskData == null || taskData.IsCompleted)
{
log.Info(workData ? "Start Data Task." : "Skip Data Task.");
taskData = workData ? WorkData() : Task.Delay(int.MaxValue);
}
log.Info("Wait tasks.");
Task.WaitAny(new Task[] { taskPasp, taskData });
}
}
static async Task WorkPasport()
{
await Task.Delay(1000);
var IpSTP = "10.10.45.152";
var PortSTP = 1070;
var nameCurrDate = "pasport";
var currDate = GetCurrData(nameCurrDate);
if (!currDate.HasValue)
currDate = new DateTime(2001, 02, 01);
NETClient netClient = new NETClient(IpSTP, PortSTP);
var flagcycle = false;
while (currDate.Value < DateTime.Now.AddDays(-1))
{
try
{
var currDir =
currDate.Value.Year.ToString("D4") + '/' +
currDate.Value.Month.ToString("D2") + '/' +
currDate.Value.Day.ToString("D2");
log.Info("Get pasports from: " + currDir);
while (!netClient.Connected() || flagcycle)
{
flagcycle = false;
if (!netClient.ReConnect())
{
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
log.Warn("Can't connect to STP.");
await Task.Delay(10000);
}
}
var currPasports = netClient.Full_Dir_Browse(currDir);
netClient.Close();
if (currPasports == null)
currPasports = Array.Empty<string>();
foreach (var paspDir in currPasports)
{
do
{
try
{
log.Info("Get pasport: " + paspDir);
while (!netClient.Connected() || flagcycle)
{
flagcycle = false;
if (!netClient.ReConnect())
{
log.Warn("Can't connect to STP.");
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
await Task.Delay(10000);
}
}
var pasp = netClient.Full_Pasp_Download(paspDir);
netClient.Close();
if (pasp == null || !pasp.HasData)
{
log.Warn("Can't get pasport.");
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
flagcycle = true;
await Task.Delay(10000);
continue;
}
while (!SendPasport(pasp))
{
log.Warn("Can't send pasp to API.");
await Task.Delay(10000);
}
break;
}
catch (Exception e)
{
log.Warn(e.Message);
netClient.Close();
flagcycle = true;
await Task.Delay(5000);
}
}
while (true);
}
log.Info("End day: " + currDir);
SaveCurrData(nameCurrDate, currDate.Value);
currDate = currDate.Value.AddDays(1);
await Task.Delay(2000);
}
catch (Exception e)
{
log.Warn(e.Message);
flagcycle = true;
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
await Task.Delay(1000 * 60 * 5);
}
}
do
{ {
log.Info("Wait next day."); log.Info("Wait next day.");
var currDate = DateTime.Now; await Task.Delay(1000 * 60 * 60);
while (currDate.ToString("yyyy.MM.dd") == DateTime.Now.ToString("yyyy.MM.dd")) } while (!(currDate.Value < DateTime.Now.AddDays(-1)));
Task.Delay(1000 * 60 * 60); currDate.Value.AddDays(-15);
try SaveCurrData(nameCurrDate, currDate.Value);
}
static async Task WorkData()
{ {
var dir_3lvl_val = await Task.Delay(1000);
currDate.Year.ToString("D4") + "/" + var IpSTP = "10.10.45.152";
currDate.Month.ToString("D2") + "/" + var PortSTP = 1070;
currDate.Day.ToString("D2"); var mainDir = Path.Combine(Directory.GetCurrentDirectory(), "archive");
log.Info("Get Pasps of " + dir_3lvl_val + "."); var nameCurrDate = "data";
var pasp_list = nc.Full_Dir_Browse(dir_3lvl_val); var currDate = GetCurrData(nameCurrDate);
foreach (var pasp_dir in pasp_list) if (!currDate.HasValue)
{ currDate = new DateTime(2001, 02, 01);
int count = 0; while (currDate.Value < DateTime.Now.AddDays(-1))
do
{ {
try try
{ {
log.Info("Get Pasp " + pasp_dir + ". Try " + (count + 1)); while(DateTime.Now.Hour < 8)
var pasp = nc.Full_Pasp_Download(pasp_dir);
if (pasp.HasData && SendPasport(pasp))
{ {
log.Info("Send OK."); log.Info("Await 8:00.");
break; await Task.Delay(15 * 1000 * 60);
} }
log.Warn("Can't send " + pasp_dir + "."); log.Info("Disconnect archive.");
Task.Delay(1000 * 60 * 5); while (DisconnectNFS(mainDir))
count = 0; await Task.Delay(1000);
} log.Info("Connect to archive.");
catch (Exception e) { log.Warn(e.Message); } while (!ConnectNFS(mainDir))
if (nc.Connect()) await Task.Delay(1000);
var subDir = Path.Combine(mainDir, "data",
currDate.Value.Year.ToString("D4"),
currDate.Value.Month.ToString("D2"),
currDate.Value.Day.ToString("D2"));
log.Info("Check dir: " + subDir);
if (Directory.Exists(Path.Combine(mainDir, "data"))) {
if (Directory.Exists(subDir))
{ {
nc.Close(); var listFiles = Directory.GetFiles(subDir);
count++; foreach (var fileDir in listFiles)
{
log.Info("Get file: " + fileDir);
var fileStruct = File.ReadAllBytes(fileDir);
log.Info("Send file to API: " + fileDir);
while (!SendData(currDate.Value, Path.GetFileName(fileDir), fileStruct))
{
log.Warn("Can't send data to API.");
await Task.Delay(10000);
}
}
} }
else else
{
var listVDP = new List<int>();
for (var i = 0; i < 50; i++) listVDP.Add(i);
for (var i = 90; i < 95; i++) listVDP.Add(i);
foreach (var vdp in listVDP)
{
var pathTmp = Path.Combine(Directory.GetCurrentDirectory(), "tmpData");
if (Directory.Exists(pathTmp)) Directory.Delete(pathTmp, true);
Directory.CreateDirectory(pathTmp);
for (var numFile = 0; numFile < 16; numFile++)
{
await Task.Delay(2000);
var name = currDate.Value.ToString("yyyyMMdd") + "." + vdp.ToString("D2") + numFile.ToString("X1");
try
{
var nc = new NETClient(IpSTP, PortSTP);
while (!nc.Connected())
if (!nc.ReConnect())
{ {
log.Warn("Can't connect to STP."); log.Warn("Can't connect to STP.");
Task.Delay(1000 * 60 * 5); await Task.Delay(5000);
count = 0;
} }
} while (count < 5); log.Info("Try download " + name);
var array = nc.Full_Download_NH(currDate.Value, vdp, numFile);
nc.Close();
if (array == null || array.Length == 0)
{
log.Info("File " + name + " not exist.");
continue;
} }
currDate = DateTime.Now; File.WriteAllBytes(Path.Combine(pathTmp, name), array);
} }
catch (Exception e) catch (Exception e)
{ {
log.Warn(e); log.Warn(e.Message);
Task.Delay(1000 * 60 * 10); log.Warn("Can't download " + name);
} }
} }
{
var files = Directory.GetFiles(pathTmp);
if (files.Length > 0)
{
var targzFile = vdp.ToString("D2") + ".tar.gz";
using (var outStream = File.Create(Path.Combine(pathTmp, targzFile)))
using (var gzoStream = new GZipOutputStream(outStream))
using (var tarArchive = TarArchive.CreateOutputTarArchive(gzoStream))
foreach (var file in files)
{
tarArchive.RootPath = Path.GetDirectoryName(file);
var tarEntry = TarEntry.CreateEntryFromFile(file);
tarEntry.Name = Path.GetFileName(file);
tarArchive.WriteEntry(tarEntry, true);
}
var fileStruct = File.ReadAllBytes(Path.Combine(pathTmp, targzFile));
while (!SendData(currDate.Value, Path.GetFileName(targzFile), fileStruct))
{
log.Warn("Can't send data to API.");
await Task.Delay(10000);
}
}
Directory.Delete(pathTmp, true);
}
}
}
log.Info("End day: " + subDir);
SaveCurrData(nameCurrDate, currDate.Value);
currDate = currDate.Value.AddDays(1);
}
else
{
log.Warn("Archive not exist.");
}
} }
catch (Exception e) catch (Exception e)
{ {
log.Warn(e); log.Warn(e.Message);
Task.Delay(1000 * 60 * 10); }
}
do
{
log.Info("Wait next day.");
await Task.Delay(1000 * 60 * 60);
} while (!(currDate.Value < DateTime.Now.AddDays(-1)));
currDate.Value.AddDays(-15);
SaveCurrData(nameCurrDate, currDate.Value);
}
static bool ConnectNFS(string dir)
{
var dirCreated = false;
while (!dirCreated)
{
try
{
dirCreated = Directory.Exists(Path.Combine(dir));
if (!dirCreated) Directory.CreateDirectory(dir);
}
catch (Exception e)
{
log.Warn(e.Message);
log.Warn("Can't create directory");
Task.Delay(60000).Wait();
}
}
try
{
var procC = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "/usr/bin/mount",
Arguments = "-t nfs 10.10.45.236:/archiv " + dir,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
},
};
if (!procC.Start())
{
log.Warn("Can't start mount command.");
Task.Delay(60000).Wait();
}
var answer = procC.StandardError.ReadToEnd() + procC.StandardOutput.ReadToEnd();
var connected = string.IsNullOrEmpty(answer);
if (connected)
{
log.Info("Connect Success");
return true;
}
log.Info(answer);
return false;
}
catch (Exception e)
{
log.Warn(e.Message);
log.Warn("Can't connect to NFS.");
Task.Delay(60000).Wait();
return false;
} }
} }
static bool DisconnectNFS(string dir)
{
var dirCreated = false;
while (!dirCreated)
{
try
{
dirCreated = Directory.Exists(Path.Combine(dir));
if (!dirCreated) Directory.CreateDirectory(dir);
}
catch (Exception e)
{
log.Warn(e.Message);
log.Warn("Can't create directory");
Task.Delay(60000).Wait();
}
}
try
{
var procD = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "/usr/bin/umount",
Arguments = dir,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
}
};
if (!procD.Start())
{
log.Warn("Can't start umount command.");
Task.Delay(60000).Wait();
}
var answer = procD.StandardError.ReadToEnd() + procD.StandardOutput.ReadToEnd();
log.Info(string.IsNullOrEmpty(answer) ? "NFS disconnected." : answer);
return string.IsNullOrEmpty(answer);
}
catch (Exception e)
{
log.Warn(e.Message);
return false;
}
} }
static HttpWebRequest GetRequest(string path, bool useProxy = true)
{
HttpWebRequest clientReq = (HttpWebRequest)WebRequest.Create(path);
clientReq.ServerCertificateValidationCallback = (sender, cert, chain, error) => { return true; };
clientReq.Method = "POST";
clientReq.ContentType = "application/json; charset=utf-8";
if (useProxy)
{
clientReq.Proxy = new WebProxy("194.226.128.245", 3128)
{
BypassProxyOnLocal = false,
Credentials = new NetworkCredential("user4", "user4")
};
}
return clientReq;
}
static bool SendPasport(Pasport pasp) static bool SendPasport(Pasport pasp)
{ {
try try
@ -151,21 +429,14 @@ namespace ClientCollector
{ {
log.Info("Check pasport on remote API server."); log.Info("Check pasport on remote API server.");
var req = JsonConvert.SerializeObject( var req = JsonConvert.SerializeObject(
new PasportCheckRep() new PasportCheckApi()
{ {
HasData = true, Status = true,
DateAndTime = pasp.dEnd.Value, DateAndTime = pasp.dEnd.Value,
Name = string.IsNullOrEmpty(pasp.nplav) ? pasp.numVDP.Value.ToString() : pasp.nplav Name = string.IsNullOrEmpty(pasp.nplav) ? pasp.numVDP.Value.ToString("D2") : pasp.nplav
}); });
var reqArr = Encoding.UTF8.GetBytes(req); var reqArr = Encoding.UTF8.GetBytes(req);
HttpWebRequest clientReq = (HttpWebRequest)WebRequest.Create("https://vsmpo.mbucb.ru/api/pasport/check"); HttpWebRequest clientReq = GetRequest("https://vsmpo.mbucb.ru/api/pasport/check");
clientReq.Method = "POST";
clientReq.ContentType = "application/json; charset=utf-8";
clientReq.Proxy = new WebProxy("194.226.128.245", 3128)
{
BypassProxyOnLocal = false,
Credentials = new NetworkCredential("user4", "user4")
};
clientReq.ContentLength = reqArr.Length; clientReq.ContentLength = reqArr.Length;
using (var stream = clientReq.GetRequestStream()) using (var stream = clientReq.GetRequestStream())
{ {
@ -174,7 +445,6 @@ namespace ClientCollector
string response = ""; string response = "";
using (var clientRes = (HttpWebResponse)clientReq.GetResponse()) using (var clientRes = (HttpWebResponse)clientReq.GetResponse())
{ {
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8)) using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8))
{ {
response = readStream.ReadToEnd(); response = readStream.ReadToEnd();
@ -182,31 +452,29 @@ namespace ClientCollector
clientRes.Close(); clientRes.Close();
} }
} }
var rep = JsonConvert.DeserializeObject<PasportCheckReq>(response); var rep = JsonConvert.DeserializeObject<PasportCheckClient>(response);
if (!rep.Status) return false; if (!rep.Status) return false;
if (rep.Exist && rep.Pasp.PaspByte.SequenceEqual(pasp.PaspByte)) return true; ulong paspSum = 0;
var paspArr = pasp.PaspByte;
foreach (var b in paspArr)
paspSum += b;
if (rep.Exist && rep.PaspSum == paspSum) return true;
if (!rep.Exist)
log.Info("API: Pasport not exist.");
if (rep.Exist && rep.PaspSum != paspSum)
log.Info("API: Wrong size pasport.");
} }
{ {
log.Info("Send pasport to remote API server."); log.Info("Send pasport to remote API server.");
var req = JsonConvert.SerializeObject( var req = JsonConvert.SerializeObject(
new PasportCreateRep() new PasportCreateApi()
{ {
HasData = true, Status = true,
DateAndTime = pasp.dEnd.Value,
Name = string.IsNullOrEmpty(pasp.nplav) ? pasp.numVDP.Value.ToString() : pasp.nplav,
Pasp = pasp Pasp = pasp
}); });
var reqArr = Encoding.UTF8.GetBytes(req); var reqArr = Encoding.UTF8.GetBytes(req);
HttpWebRequest clientReq = (HttpWebRequest)WebRequest.Create("https://vsmpo.mbucb.ru/api/pasport/create"); HttpWebRequest clientReq = GetRequest("https://vsmpo.mbucb.ru/api/pasport/create");
clientReq.Method = "POST";
clientReq.ContentType = "application/json; charset=utf-8";
clientReq.Proxy = new WebProxy("194.226.128.245", 3128)
{
BypassProxyOnLocal = false,
Credentials = new NetworkCredential("user4", "user4")
};
clientReq.ContentLength = reqArr.Length; clientReq.ContentLength = reqArr.Length;
using (var stream = clientReq.GetRequestStream()) using (var stream = clientReq.GetRequestStream())
{ {
@ -215,7 +483,6 @@ namespace ClientCollector
string response = ""; string response = "";
using (var clientRes = (HttpWebResponse)clientReq.GetResponse()) using (var clientRes = (HttpWebResponse)clientReq.GetResponse())
{ {
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8)) using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8))
{ {
response = readStream.ReadToEnd(); response = readStream.ReadToEnd();
@ -223,7 +490,7 @@ namespace ClientCollector
clientRes.Close(); clientRes.Close();
} }
} }
var rep = JsonConvert.DeserializeObject<PasportCreateReq>(response); var rep = JsonConvert.DeserializeObject<PasportCreateClient>(response);
if (!rep.Status) return false; if (!rep.Status) return false;
} }
return true; return true;
@ -234,7 +501,83 @@ namespace ClientCollector
return false; return false;
} }
} }
static bool SendData(DateTime dateAndTime, string fileName, byte[] fileStruct)
{
try
{
{
log.Info("Check data on remote API server.");
var req = JsonConvert.SerializeObject(
new DataCheckApi()
{
Status = true,
DateAndTime = dateAndTime,
Name = fileName
});
var reqArr = Encoding.UTF8.GetBytes(req);
HttpWebRequest clientReq = GetRequest("https://vsmpo.mbucb.ru/api/data/check");
clientReq.ContentLength = reqArr.Length;
using (var stream = clientReq.GetRequestStream())
{
stream.Write(reqArr, 0, reqArr.Length);
}
string response = "";
using (var clientRes = (HttpWebResponse)clientReq.GetResponse())
{
using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8))
{
response = readStream.ReadToEnd();
readStream.Close();
clientRes.Close();
}
}
var rep = JsonConvert.DeserializeObject<DataCheckClient>(response);
if (!rep.Status) return false;
if (rep.Exist && rep.DataSize == (ulong)fileStruct.Length) return true;
if (!rep.Exist)
log.Info("API: Data not exist.");
if (rep.Exist && rep.DataSize != (ulong)fileStruct.Length)
log.Info("API: Wrong size data.");
}
{
log.Info("Send data to remote API server.");
var req = JsonConvert.SerializeObject(
new DataCreateApi()
{
Status = true,
DateAndTime = dateAndTime,
Name = fileName,
Struct = fileStruct
});
var reqArr = Encoding.UTF8.GetBytes(req);
HttpWebRequest clientReq = GetRequest("https://vsmpo.mbucb.ru/api/data/create");
clientReq.ContentLength = reqArr.Length;
using (var stream = clientReq.GetRequestStream())
{
stream.Write(reqArr, 0, reqArr.Length);
}
string response = "";
using (var clientRes = (HttpWebResponse)clientReq.GetResponse())
{
using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8))
{
response = readStream.ReadToEnd();
readStream.Close();
clientRes.Close();
}
}
var rep = JsonConvert.DeserializeObject<DataCreateClient>(response);
if (!rep.Status) return false;
}
return true;
}
catch (Exception e)
{
log.Warn(e.Message);
return false;
}
}
static void LogConf() static void LogConf()
{ {
var conf = new LoggingConfiguration(); var conf = new LoggingConfiguration();
@ -247,6 +590,77 @@ namespace ClientCollector
conf.AddRule(LogLevel.Trace, LogLevel.Fatal, logcon); conf.AddRule(LogLevel.Trace, LogLevel.Fatal, logcon);
LogManager.Configuration = conf; LogManager.Configuration = conf;
} }
static bool SaveCurrData(string name, DateTime currDate)
{
try
{
var fileForSave = Path.Combine(Directory.GetCurrentDirectory(), "currentState");
var currStrings = Array.Empty<string>();
if (File.Exists(fileForSave))
currStrings = File.ReadAllLines(fileForSave, Encoding.UTF8);
var newString =
name + ':' +
currDate.Year.ToString("D4") +
currDate.Month.ToString("D2") +
currDate.Day.ToString("D2");
for (var i = 0; i < currStrings.Length; i++)
{
var splitString = currStrings[i].Split(':');
if (splitString.Length != 2) continue;
if (splitString[0] != name) continue;
currStrings[i] = newString;
newString = null;
break;
}
if (!string.IsNullOrEmpty(newString))
{
Array.Resize(ref currStrings, currStrings.Length + 1);
currStrings[currStrings.Length - 1] = newString;
}
File.WriteAllLines(fileForSave, currStrings, Encoding.UTF8);
return true;
}
catch (Exception e)
{
log.Warn(e.Message);
return false;
}
}
static DateTime? GetCurrData(string name)
{
try
{
var file = Path.Combine(Directory.GetCurrentDirectory(), "currentState");
if (!File.Exists(file))
{
log.Info("State file not exist.");
return null;
}
var listStrings = File.ReadAllLines(file, Encoding.UTF8);
for(var i = 0; i < listStrings.Length; i++)
{
var splitString = listStrings[i].Split(':');
if (splitString.Length != 2) continue;
if (splitString[0] != name) continue;
if (
!int.TryParse(splitString[1].Substring(0, 4), out int year) ||
!int.TryParse(splitString[1].Substring(4, 2), out int month) ||
!int.TryParse(splitString[1].Substring(6, 2), out int day))
{
log.Warn("Wron format state string.");
return null;
}
return new DateTime(year, month, day);
}
log.Info("State not exist.");
return null;
}
catch (Exception e)
{
log.Warn(e.Message);
return null;
}
}
} }
} }

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<History>True|2021-07-31T15:35:08.9408458Z;True|2021-07-31T20:20:29.0886405+05:00;</History> <History>True|2021-08-04T08:32:08.9292702Z;True|2021-08-04T13:23:40.4456694+05:00;True|2021-08-03T17:34:00.5000813+05:00;True|2021-08-03T16:17:51.6290703+05:00;True|2021-08-03T16:09:52.5362744+05:00;True|2021-08-03T16:06:46.4824852+05:00;True|2021-08-03T15:36:41.6609527+05:00;True|2021-08-03T15:35:25.5203278+05:00;True|2021-08-03T15:31:12.5276170+05:00;True|2021-08-03T09:16:13.2186336+05:00;True|2021-08-03T09:08:23.8217457+05:00;True|2021-08-03T06:22:57.0758714+05:00;True|2021-08-03T06:18:08.6594656+05:00;True|2021-08-02T22:58:49.1867297+05:00;True|2021-08-02T22:56:02.6749724+05:00;True|2021-08-02T22:50:24.0842490+05:00;True|2021-08-02T22:46:50.7307549+05:00;True|2021-08-02T22:46:32.2783734+05:00;True|2021-08-02T22:37:45.7957317+05:00;True|2021-08-02T22:34:37.2905589+05:00;True|2021-08-02T22:31:30.3451541+05:00;True|2021-08-02T12:26:02.5496847+05:00;True|2021-08-01T23:12:48.3492831+05:00;True|2021-08-01T22:53:02.2382201+05:00;True|2021-08-01T22:48:16.9658882+05:00;True|2021-08-01T22:40:58.1479436+05:00;True|2021-08-01T22:28:58.9840017+05:00;True|2021-08-01T20:16:20.5210616+05:00;True|2021-08-01T19:27:43.9900600+05:00;True|2021-08-01T19:18:48.8000969+05:00;True|2021-08-01T19:15:19.9257002+05:00;True|2021-08-01T19:08:17.1315589+05:00;True|2021-07-31T20:35:08.9408458+05:00;True|2021-07-31T20:20:29.0886405+05:00;</History>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -0,0 +1 @@
pasport:20010101

@ -10,7 +10,8 @@
"dependencies": { "dependencies": {
"DataClient": "0.0.3", "DataClient": "0.0.3",
"NLog": "4.7.10", "NLog": "4.7.10",
"Newtonsoft.Json": "13.0.1" "Newtonsoft.Json": "13.0.1",
"SharpZipLib": "1.3.2"
}, },
"runtime": { "runtime": {
"ClientCollector.dll": {} "ClientCollector.dll": {}
@ -117,6 +118,14 @@
} }
} }
}, },
"SharpZipLib/1.3.2": {
"runtime": {
"lib/netstandard2.1/ICSharpCode.SharpZipLib.dll": {
"assemblyVersion": "1.3.2.10",
"fileVersion": "1.3.2.10"
}
}
},
"DataClient/0.0.3": { "DataClient/0.0.3": {
"dependencies": { "dependencies": {
"NLog": "4.7.10", "NLog": "4.7.10",
@ -205,6 +214,13 @@
"path": "nlog.extensions.logging/1.7.2", "path": "nlog.extensions.logging/1.7.2",
"hashPath": "nlog.extensions.logging.1.7.2.nupkg.sha512" "hashPath": "nlog.extensions.logging.1.7.2.nupkg.sha512"
}, },
"SharpZipLib/1.3.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-WSdeDReL8eugMCw5BH/tFAZpgR+YsYMwm6kIvqg3J8LbfRjbbebmEzn63AbEveqyMOljBO68g6tCCv165wMkSg==",
"path": "sharpziplib/1.3.2",
"hashPath": "sharpziplib.1.3.2.nupkg.sha512"
},
"DataClient/0.0.3": { "DataClient/0.0.3": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,

@ -10,7 +10,8 @@
"dependencies": { "dependencies": {
"DataClient": "0.0.3", "DataClient": "0.0.3",
"NLog": "4.7.10", "NLog": "4.7.10",
"Newtonsoft.Json": "13.0.1" "Newtonsoft.Json": "13.0.1",
"SharpZipLib": "1.3.2"
}, },
"runtime": { "runtime": {
"ClientCollector.dll": {} "ClientCollector.dll": {}
@ -117,6 +118,14 @@
} }
} }
}, },
"SharpZipLib/1.3.2": {
"runtime": {
"lib/netstandard2.1/ICSharpCode.SharpZipLib.dll": {
"assemblyVersion": "1.3.2.10",
"fileVersion": "1.3.2.10"
}
}
},
"DataClient/0.0.3": { "DataClient/0.0.3": {
"dependencies": { "dependencies": {
"NLog": "4.7.10", "NLog": "4.7.10",
@ -205,6 +214,13 @@
"path": "nlog.extensions.logging/1.7.2", "path": "nlog.extensions.logging/1.7.2",
"hashPath": "nlog.extensions.logging.1.7.2.nupkg.sha512" "hashPath": "nlog.extensions.logging.1.7.2.nupkg.sha512"
}, },
"SharpZipLib/1.3.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-WSdeDReL8eugMCw5BH/tFAZpgR+YsYMwm6kIvqg3J8LbfRjbbebmEzn63AbEveqyMOljBO68g6tCCv165wMkSg==",
"path": "sharpziplib/1.3.2",
"hashPath": "sharpziplib.1.3.2.nupkg.sha512"
},
"DataClient/0.0.3": { "DataClient/0.0.3": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,

@ -1,25 +1,24 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj": {} "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj": {}
}, },
"projects": { "projects": {
"D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj": { "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj",
"projectName": "ClientCollector", "projectName": "ClientCollector",
"projectPath": "D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\ClientCollector\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\ClientCollector\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -35,8 +34,8 @@
"net5.0": { "net5.0": {
"targetAlias": "net5.0", "targetAlias": "net5.0",
"projectReferences": { "projectReferences": {
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj" "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj"
} }
} }
} }
@ -58,6 +57,10 @@
"Newtonsoft.Json": { "Newtonsoft.Json": {
"target": "Package", "target": "Package",
"version": "[13.0.1, )" "version": "[13.0.1, )"
},
"SharpZipLib": {
"target": "Package",
"version": "[1.3.2, )"
} }
}, },
"imports": [ "imports": [
@ -75,26 +78,25 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
}, },
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"version": "0.0.3", "version": "0.0.3",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"projectName": "DataClient", "projectName": "DataClient",
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\DataClient\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\DataClient\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -150,7 +152,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
} }

@ -5,15 +5,14 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\google\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Admin\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.10.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.10.0</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\google\.nuget\packages\" /> <SourceRoot Include="C:\Users\Admin\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" />
<SourceRoot Include="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

@ -30,3 +30,35 @@ D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.dll
D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ref\ClientCollector.dll D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ref\ClientCollector.dll
D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.pdb D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.pdb
D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.genruntimeconfig.cache D:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.genruntimeconfig.cache
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ClientCollector.exe
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Config\analog\default.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Config\config.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ClientCollector.deps.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ClientCollector.runtimeconfig.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ClientCollector.runtimeconfig.dev.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ref\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\ClientCollector.pdb
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.Configuration.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.DependencyInjection.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.Logging.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.Options.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Microsoft.Extensions.Primitives.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\Newtonsoft.Json.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\NLog.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\NLog.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\ClientCollector\bin\Debug\net5.0\DataClient.xml
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.csproj.AssemblyReference.cache
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.GeneratedMSBuildEditorConfig.editorconfig
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.AssemblyInfoInputs.cache
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.AssemblyInfo.cs
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.csproj.CoreCompileInputs.cache
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.csproj.CopyComplete
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ref\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.pdb
F:\GIT\ASCKU_PC\ClientCollector\obj\Debug\net5.0\ClientCollector.genruntimeconfig.cache

@ -1 +1 @@
381935b869564bcce9839e36dd6b31f277b4f257 b8ef049e49398d7019ddc75458087be327b62a97

@ -29,3 +29,35 @@ D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.dll
D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ref\ClientCollector.dll D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ref\ClientCollector.dll
D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.pdb D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.pdb
D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.genruntimeconfig.cache D:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.genruntimeconfig.cache
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ClientCollector.exe
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Config\analog\default.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Config\config.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ClientCollector.deps.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ClientCollector.runtimeconfig.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ClientCollector.runtimeconfig.dev.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ref\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ClientCollector.pdb
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.Configuration.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.DependencyInjection.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.Logging.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.Options.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Microsoft.Extensions.Primitives.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\Newtonsoft.Json.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\NLog.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\NLog.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.csproj.AssemblyReference.cache
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.GeneratedMSBuildEditorConfig.editorconfig
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.AssemblyInfoInputs.cache
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.AssemblyInfo.cs
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.csproj.CoreCompileInputs.cache
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.csproj.CopyComplete
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ref\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.pdb
F:\GIT\ASCKU_PC\ClientCollector\obj\Release\net5.0\ClientCollector.genruntimeconfig.cache
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\net5.0\ICSharpCode.SharpZipLib.dll

@ -15,5 +15,6 @@ D:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.Primitives.dll
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\Newtonsoft.Json.dll D:\GIT\ASCKU_PC\ClientCollector\bin\Release\Newtonsoft.Json.dll
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\NLog.dll D:\GIT\ASCKU_PC\ClientCollector\bin\Release\NLog.dll
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\NLog.Extensions.Logging.dll D:\GIT\ASCKU_PC\ClientCollector\bin\Release\NLog.Extensions.Logging.dll
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\ICSharpCode.SharpZipLib.dll
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\DataClient.dll D:\GIT\ASCKU_PC\ClientCollector\bin\Release\DataClient.dll
D:\GIT\ASCKU_PC\ClientCollector\bin\Release\DataClient.pdb D:\GIT\ASCKU_PC\ClientCollector\bin\Release\DataClient.pdb

@ -0,0 +1,19 @@
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Config\analog\default.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Config\config.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\ClientCollector.exe
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\ClientCollector.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\ClientCollector.deps.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\ClientCollector.runtimeconfig.json
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\ClientCollector.pdb
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.Configuration.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.DependencyInjection.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.DependencyInjection.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.Logging.Abstractions.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.Options.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Microsoft.Extensions.Primitives.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\Newtonsoft.Json.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\NLog.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\NLog.Extensions.Logging.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\DataClient.dll
F:\GIT\ASCKU_PC\ClientCollector\bin\Release\DataClient.pdb

@ -113,6 +113,15 @@
"lib/net5.0/NLog.Extensions.Logging.dll": {} "lib/net5.0/NLog.Extensions.Logging.dll": {}
} }
}, },
"SharpZipLib/1.3.2": {
"type": "package",
"compile": {
"lib/netstandard2.1/ICSharpCode.SharpZipLib.dll": {}
},
"runtime": {
"lib/netstandard2.1/ICSharpCode.SharpZipLib.dll": {}
}
},
"DataClient/0.0.3": { "DataClient/0.0.3": {
"type": "project", "type": "project",
"framework": ".NETCoreApp,Version=v5.0", "framework": ".NETCoreApp,Version=v5.0",
@ -367,6 +376,27 @@
"nlog.extensions.logging.nuspec" "nlog.extensions.logging.nuspec"
] ]
}, },
"SharpZipLib/1.3.2": {
"sha512": "WSdeDReL8eugMCw5BH/tFAZpgR+YsYMwm6kIvqg3J8LbfRjbbebmEzn63AbEveqyMOljBO68g6tCCv165wMkSg==",
"type": "package",
"path": "sharpziplib/1.3.2",
"files": [
".nupkg.metadata",
".signature.p7s",
"images/sharpziplib-nuget-256x256.png",
"lib/net45/ICSharpCode.SharpZipLib.dll",
"lib/net45/ICSharpCode.SharpZipLib.pdb",
"lib/net45/ICSharpCode.SharpZipLib.xml",
"lib/netstandard2.0/ICSharpCode.SharpZipLib.dll",
"lib/netstandard2.0/ICSharpCode.SharpZipLib.pdb",
"lib/netstandard2.0/ICSharpCode.SharpZipLib.xml",
"lib/netstandard2.1/ICSharpCode.SharpZipLib.dll",
"lib/netstandard2.1/ICSharpCode.SharpZipLib.pdb",
"lib/netstandard2.1/ICSharpCode.SharpZipLib.xml",
"sharpziplib.1.3.2.nupkg.sha512",
"sharpziplib.nuspec"
]
},
"DataClient/0.0.3": { "DataClient/0.0.3": {
"type": "project", "type": "project",
"path": "../DataClient/DataClient.csproj", "path": "../DataClient/DataClient.csproj",
@ -377,31 +407,30 @@
"net5.0": [ "net5.0": [
"DataClient >= 0.0.3", "DataClient >= 0.0.3",
"NLog >= 4.7.10", "NLog >= 4.7.10",
"Newtonsoft.Json >= 13.0.1" "Newtonsoft.Json >= 13.0.1",
"SharpZipLib >= 1.3.2"
] ]
}, },
"packageFolders": { "packageFolders": {
"C:\\Users\\google\\.nuget\\packages\\": {}, "C:\\Users\\Admin\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {},
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}, "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
}, },
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj",
"projectName": "ClientCollector", "projectName": "ClientCollector",
"projectPath": "D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\ClientCollector\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\ClientCollector\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -417,8 +446,8 @@
"net5.0": { "net5.0": {
"targetAlias": "net5.0", "targetAlias": "net5.0",
"projectReferences": { "projectReferences": {
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj" "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj"
} }
} }
} }
@ -440,6 +469,10 @@
"Newtonsoft.Json": { "Newtonsoft.Json": {
"target": "Package", "target": "Package",
"version": "[13.0.1, )" "version": "[13.0.1, )"
},
"SharpZipLib": {
"target": "Package",
"version": "[1.3.2, )"
} }
}, },
"imports": [ "imports": [
@ -457,7 +490,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
} }

@ -1,19 +1,20 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "4epxhxxqM5SAn5/9F6/bGIHXw5/ScXkV3Fnpxx1s5LXd8HLEicu36cn+HzGRnZuZrclSVkG7GSGYyc/b7S5lXA==", "dgSpecHash": "z0XxiEFHjjZdyGbQNmtO/rlHCWqDApEdxrwSd4tdkMY+UAuAK1x1lBhXuQpTQpLpSzoOBfvu7oP7zwKNJV9F6A==",
"success": true, "success": true,
"projectFilePath": "D:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj", "projectFilePath": "F:\\GIT\\ASCKU_PC\\ClientCollector\\ClientCollector.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.0\\microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.0\\microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\nlog\\4.7.10\\nlog.4.7.10.nupkg.sha512", "C:\\Users\\Admin\\.nuget\\packages\\nlog\\4.7.10\\nlog.4.7.10.nupkg.sha512",
"C:\\Users\\google\\.nuget\\packages\\nlog.extensions.logging\\1.7.2\\nlog.extensions.logging.1.7.2.nupkg.sha512" "C:\\Users\\Admin\\.nuget\\packages\\nlog.extensions.logging\\1.7.2\\nlog.extensions.logging.1.7.2.nupkg.sha512",
"C:\\Users\\Admin\\.nuget\\packages\\sharpziplib\\1.3.2\\sharpziplib.1.3.2.nupkg.sha512"
], ],
"logs": [] "logs": []
} }

@ -317,6 +317,15 @@ namespace DataClient
catch { return false; } catch { return false; }
return Connected(); return Connected();
} }
public bool ReConnect()
{
if (tcpC != null && tcpC.Connected)
tcpC.Close();
tcpC = new TcpClient();
try { tcpC.Connect(new IPEndPoint(IPAddress.Parse(ip), port)); }
catch { return false; }
return Connected();
}
/// <include file='DataClientSrc.xml' path='docs/NET/m[@n="Connected"]/*' /> /// <include file='DataClientSrc.xml' path='docs/NET/m[@n="Connected"]/*' />
public bool Connected() { return (tcpC != null && tcpC.Connected); } public bool Connected() { return (tcpC != null && tcpC.Connected); }
/// <include file='DataClientSrc.xml' path='docs/NET/m[@n="Close"]/*' /> /// <include file='DataClientSrc.xml' path='docs/NET/m[@n="Close"]/*' />

@ -1,25 +1,24 @@
{ {
"format": 1, "format": 1,
"restore": { "restore": {
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {} "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {}
}, },
"projects": { "projects": {
"D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {
"version": "0.0.3", "version": "0.0.3",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"projectName": "DataClient", "projectName": "DataClient",
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\DataClient\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\DataClient\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -75,7 +74,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
} }

@ -5,15 +5,14 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\google\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Admin\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages;C:\Program Files (x86)\Microsoft\Xamarin\NuGet\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.10.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.10.0</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\google\.nuget\packages\" /> <SourceRoot Include="C:\Users\Admin\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" /> <SourceRoot Include="C:\Program Files (x86)\Microsoft\Xamarin\NuGet\" />
<SourceRoot Include="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

@ -13,3 +13,18 @@ D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.csproj.CoreCompileInputs.
D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.dll D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.dll
D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\ref\DataClient.dll D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\ref\DataClient.dll
D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.pdb D:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\Config\analog\default.json
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\Config\config.json
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\DataClient.deps.json
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\ref\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\DataClient\bin\Debug\net5.0\DataClient.xml
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.csproj.AssemblyReference.cache
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.GeneratedMSBuildEditorConfig.editorconfig
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.AssemblyInfoInputs.cache
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.AssemblyInfo.cs
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.csproj.CoreCompileInputs.cache
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\ref\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\obj\Debug\net5.0\DataClient.pdb

@ -12,3 +12,17 @@ D:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\DataClient.pdb
D:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.dll D:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.dll
D:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\ref\DataClient.dll D:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\ref\DataClient.dll
D:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.pdb D:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\Config\analog\default.json
F:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\Config\config.json
F:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\DataClient.deps.json
F:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\ref\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\bin\Release\net5.0\DataClient.pdb
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.csproj.AssemblyReference.cache
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.GeneratedMSBuildEditorConfig.editorconfig
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.AssemblyInfoInputs.cache
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.AssemblyInfo.cs
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.csproj.CoreCompileInputs.cache
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\ref\DataClient.dll
F:\GIT\ASCKU_PC\DataClient\obj\Release\net5.0\DataClient.pdb

@ -361,27 +361,25 @@
] ]
}, },
"packageFolders": { "packageFolders": {
"C:\\Users\\google\\.nuget\\packages\\": {}, "C:\\Users\\Admin\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {},
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}, "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\": {}
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
}, },
"project": { "project": {
"version": "0.0.3", "version": "0.0.3",
"restore": { "restore": {
"projectUniqueName": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectUniqueName": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"projectName": "DataClient", "projectName": "DataClient",
"projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", "projectPath": "F:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj",
"packagesPath": "C:\\Users\\google\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Admin\\.nuget\\packages\\",
"outputPath": "D:\\GIT\\ASCKU_PC\\DataClient\\obj\\", "outputPath": "F:\\GIT\\ASCKU_PC\\DataClient\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [ "fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\"
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
], ],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\Admin\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
@ -437,7 +435,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.301\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.300\\RuntimeIdentifierGraph.json"
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More