diff --git a/DataClient/Config/config.json b/DataClient/Config/config.json new file mode 100644 index 0000000..f71d35f --- /dev/null +++ b/DataClient/Config/config.json @@ -0,0 +1,16 @@ +{ + "servers": [ + { + "name": "STP 1", + "ip": "10.10.45.151", + "port": 1070, + "dir": "Y:\\data" + }, + { + "name": "STP 2", + "ip": "10.10.45.152", + "port": 1070, + "dir": "Z:\\data" + } + ] +} diff --git a/DataClient/DataClient.csproj b/DataClient/DataClient.csproj new file mode 100644 index 0000000..015554f --- /dev/null +++ b/DataClient/DataClient.csproj @@ -0,0 +1,26 @@ + + + + net5.0 + DataClient + DataClient + 0.0.3 + + + + + + + + + + + + + + + Always + + + + diff --git a/DataClient/DataClient.csproj.user b/DataClient/DataClient.csproj.user new file mode 100644 index 0000000..b75df9c --- /dev/null +++ b/DataClient/DataClient.csproj.user @@ -0,0 +1,6 @@ + + + + <_LastSelectedProfileId>D:\GIT\ASCKU_PC\STPClient\Properties\PublishProfiles\FolderProfile.pubxml + + \ No newline at end of file diff --git a/DataClient/NETClient.cs b/DataClient/NETClient.cs new file mode 100644 index 0000000..d52d5ab --- /dev/null +++ b/DataClient/NETClient.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using NLog; + +namespace DataClient +{ + public class NETClient + { + private Logger log = LogManager.GetCurrentClassLogger(); + private string ip = "127.0.0.1"; + public string Ip + { + get { return ip; } + set + { + if (!IPAddress.TryParse(value, out _)) + throw new Exception("Wrong ip address."); + else + ip = value; + } + } + private int port = 1070; + public int Port + { + get { return port; } + set + { + if (value < 1 && value > 65535) + throw new Exception("Wrong port."); + else + port = value; + } + } + + private enum Code : uint + { + check_command = 4294967295, + version = 0, + pasp_download = 4, + download_nh = 21, + dir_browse = 23, + user_flags = 26 + } + + //Construction + public NETClient(string ip, int port) + { + Ip = ip; + Port = port; + } + + + //Work with socket functions + + + //Support functions + + + //Main functions + + } +} diff --git a/DataClient/Properties/PublishProfiles/FolderProfile.pubxml b/DataClient/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 0000000..97d40c8 --- /dev/null +++ b/DataClient/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,12 @@ + + + + + Release + Any CPU + ..\Release\DataClient\ + FileSystem + + \ No newline at end of file diff --git a/DataClient/Properties/PublishProfiles/FolderProfile.pubxml.user b/DataClient/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 0000000..a7e830d --- /dev/null +++ b/DataClient/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,9 @@ + + + + + True|2021-05-27T05:25:25.8638099Z;True|2021-05-27T10:16:30.2483150+05:00; + + \ No newline at end of file diff --git a/DataClient/Properties/launchSettings.json b/DataClient/Properties/launchSettings.json new file mode 100644 index 0000000..433eb01 --- /dev/null +++ b/DataClient/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "DataClient": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/DataClient/STPClient.cs b/DataClient/STPClient.cs new file mode 100644 index 0000000..4f0a86a --- /dev/null +++ b/DataClient/STPClient.cs @@ -0,0 +1,236 @@ +using System; +using System.IO; +using System.Collections.Generic; +using NLog; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using DataClient.Struct; +using System.Net; + +namespace DataClient +{ + /// + /// Класс для связи с СТП. Содержит все инструменты, для получения данных. + /// + public class STPClient + { + //Переменные + Logger log = LogManager.GetCurrentClassLogger(); + string confDir = Path.Combine(Directory.GetCurrentDirectory(), "Config", "config.json"); + private List servers = new List(); + int serverDefault = -1; + //Геттеры и сеттеры + /// Номер сервера, используемого по умолчанию. + public int UseServer + { + get { return serverDefault; } + set { + serverDefault = + (servers.Count == 0) ? -1 : + (value < 0) ? 0 : + (value >= servers.Count) ? serverDefault = servers.Count - 1 : + value; + } + } + /// Массив серверов, инициализированных в экземпляре класса. + public server[] ListServers { get { return servers.ToArray(); } } + + //Функции + /// Получение номера сервера по его названию. + /// Название сервера. + /// Номер сервера в списке серверов. + public int GetServerIdByName(string name) + { + return servers.FindIndex(x => x.name == name); + } + /// Получение название сервера по его номеру. + /// Номер сервера в списке серверов. + /// Название сервера. + public string GetServerNameById(int id) + { + var res = (id >= servers.Count || id < 0) ? null : servers[id].name; + return res; + } + /// Проверка параметров серевера перед их добавлением в список. + /// IP адресс сервера. + /// Порт сервера. + /// Путь к архиву. + /// Результат выполнения функции. + private bool CheckDataServer(string ip, int port, string dir) + { + if (!IPAddress.TryParse(ip, out _)) + { + log.Warn("Ip address incorrect: " + ip + " ."); + return false; + } + if (port < 1 && port > 65535) + { + log.Warn("Port incorrect: " + port.ToString() + "."); + return false; + } + if (!Directory.Exists(dir)) + { + log.Warn("Directory incorrect or not exist: " + dir + " ."); + return false; + } + return true; + } + /// Добавление сервера в список серверов. + /// Название сервера + /// IP адресс сервера. + /// Порт сервера. + /// Путь к архиву. + /// Результат выполнения функции. + public bool AddServer(string name, string ip, int port, string dir) + { + if (!CheckDataServer(ip, port, dir)) + { + log.Warn("Server not added: Data incorrect."); + return false; + } + if (string.IsNullOrEmpty(name)) + { + log.Warn("Server not added: Incorrect name server."); + return false; + } + if (servers.FindIndex(x => x.name == name) != -1) + { + log.Warn("Server not added: Server with this name exist."); + return false; + } + servers.Add(new server(name, ip, port, dir)); + UseServer = 0; + log.Trace("Server (name=" + name + ";ip=" + ip + ";port=" + port + ";dir=" + dir + ") added."); + return true; + } + /// Изменение сервера в списке серверов по его номеру. + /// Номер сервера в списке серверов. + /// Название сервера. + /// IP адресс сервера. + /// Порт сервера. + /// Путь к архиву. + /// Результат выполнения функции. + public bool ChangeServerById(int id, string name, string ip, int port, string dir) + { + if (servers.Count == 0 || id >= servers.Count || id < 0) + { + log.Warn("Server not changed: Id incorrect."); + return false; + } + if (!CheckDataServer(ip, port, dir)) + { + log.Warn("Server not changed: Data incorrect."); + return false; + } + var tmpId = servers.FindIndex(x => x.name == name); + if (string.IsNullOrEmpty(name) || (tmpId != -1 && tmpId != id)) + { + log.Warn("Server not changed: Name incorrect."); + return false; + } + var tmp = new server(name, ip, port, dir); + log.Trace("Server id=" + id + " changed: name=" + name + ";ip=" + ip + ";port=" + port.ToString() + ";dir=" + dir + ";."); + servers[id] = tmp; + return true; + } + /// Изменение сервера в списке серверов по его названию. + /// Название сервера. + /// IP адресс сервера. + /// Порт сервера. + /// Путь к архиву. + /// Результат выполнения функции. + public bool ChangeServerByName(string name, string ip, int port, string dir) + { + var id = servers.FindIndex(x => x.name == name); + if (id == -1) + { + log.Warn("Server not changed: Name incorrect or server not exist."); + return false; + } + return ChangeServerById(id, name, ip, port, dir); + } + /// Удаление сервера из списка серверов по его номеру. + /// Номер сервера в списке серверов. + /// Результат выполнения функции. + public bool RemoveServerById(int id) + { + if (servers.Count == 0 || id >= servers.Count || id < 0) + { + log.Warn("Server not removed: Id incorrect or list server are empty."); + return false; + } + log.Trace("Server id=" + id.ToString() + ";name=" + servers[id].name + ";ip=" + servers[id].ip + ";port=" + servers[id].port.ToString() + ";dir=" + servers[id].dir + "; removed."); + servers.RemoveAt(id); + UseServer = 0; + return true; + } + /// Удаление сервера из списка серверов по его названию. + /// Название сервера. + /// Результат выполнения функции. + public bool RemoveServerByName(string name) + { + var id = servers.FindIndex(x => x.name == name); + if (id == -1) + { + log.Warn("Server not removed: Name incorrect or server not exist."); + return false; + } + return RemoveServerById(id); + } + /// Чтение конфигурационнного файла и установка параметров по умолчанию. + private void Config() + { + string jsonString; + try + { + jsonString = File.ReadAllText(confDir); + } + catch (Exception e) + { + log.Warn(e, "Can't read config file from " + confDir + "."); + return; + } + var conf = (JObject)JsonConvert.DeserializeObject(jsonString); + if (!conf.HasValues && !conf["servers"].HasValues && conf["servers"].Type != JTokenType.Array) + { + log.Warn("Doesn't exist \"servers\" object in config file."); + return; + } + var count = -1; + foreach (var s in conf["servers"]) + { + count++; + var name = (s["name"].Type == JTokenType.String) ? (string)s["name"] : "default"; + var ip = (s["ip"].Type == JTokenType.String) ? (string)s["ip"] : ""; + var port = (s["port"].Type == JTokenType.Integer) ? (int)s["port"] : -1; + var dir = (s["dir"].Type == JTokenType.String) ? (string)s["dir"] : ""; + var res = false; + if (GetServerIdByName(name) == -1) + res = AddServer(name, ip, port, dir); + else + res = ChangeServerByName(name, ip, port, dir); + if (!res) + log.Trace("Can't add or change server #" + count + " from conf file."); + } + } + /// Создание экземпляра класса. + public STPClient() + { + log.Trace("Create instance class."); + Config(); + } + /// Создание экземпляра класса с указанием конфигурационного файла. + /// Путь к файлу конфигурации. + public STPClient(string confDir) + { + log.Trace("Create instance class with dir:" + confDir + "."); + this.confDir = confDir; + Config(); + } + + + + + } + +} \ No newline at end of file diff --git a/DataClient/Struct.cs b/DataClient/Struct.cs new file mode 100644 index 0000000..d550387 --- /dev/null +++ b/DataClient/Struct.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DataClient.Struct +{ + public struct server + { + public string name; + public string ip; + public int port; + public string dir; + public server(string Ip, int Port, string Dir) + { + name = "default"; + ip = Ip; + port = Port; + dir = Dir; + } + public server(string Name, string Ip, int Port, string Dir) + { + name = Name; + ip = Ip; + port = Port; + dir = Dir; + } + } +} diff --git a/DataClient/obj/DataClient.csproj.nuget.dgspec.json b/DataClient/obj/DataClient.csproj.nuget.dgspec.json new file mode 100644 index 0000000..912f7b5 --- /dev/null +++ b/DataClient/obj/DataClient.csproj.nuget.dgspec.json @@ -0,0 +1,83 @@ +{ + "format": 1, + "restore": { + "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": {} + }, + "projects": { + "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj": { + "version": "0.0.3", + "restore": { + "projectUniqueName": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", + "projectName": "DataClient", + "projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", + "packagesPath": "C:\\Users\\google\\.nuget\\packages\\", + "outputPath": "D:\\GIT\\ASCKU_PC\\DataClient\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], + "configFilePaths": [ + "C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.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\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net5.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "dependencies": { + "NLog": { + "target": "Package", + "version": "[4.7.10, )" + }, + "NLog.Extensions.Logging": { + "target": "Package", + "version": "[1.7.2, )" + }, + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.1, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.201\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/DataClient/obj/DataClient.csproj.nuget.g.props b/DataClient/obj/DataClient.csproj.nuget.g.props new file mode 100644 index 0000000..471ec1a --- /dev/null +++ b/DataClient/obj/DataClient.csproj.nuget.g.props @@ -0,0 +1,21 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + 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 + PackageReference + 5.9.0 + + + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/DataClient/obj/DataClient.csproj.nuget.g.targets b/DataClient/obj/DataClient.csproj.nuget.g.targets new file mode 100644 index 0000000..53cfaa1 --- /dev/null +++ b/DataClient/obj/DataClient.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/DataClient/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs b/DataClient/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2f7e5ec --- /dev/null +++ b/DataClient/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")] diff --git a/DataClient/obj/Debug/net5.0/DataClient.AssemblyInfo.cs b/DataClient/obj/Debug/net5.0/DataClient.AssemblyInfo.cs new file mode 100644 index 0000000..0f69854 --- /dev/null +++ b/DataClient/obj/Debug/net5.0/DataClient.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("DataClient")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.3.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.3")] +[assembly: System.Reflection.AssemblyProductAttribute("DataClient")] +[assembly: System.Reflection.AssemblyTitleAttribute("DataClient")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.0.3.0")] + +// Создано классом WriteCodeFragment MSBuild. + diff --git a/DataClient/obj/Debug/net5.0/DataClient.AssemblyInfoInputs.cache b/DataClient/obj/Debug/net5.0/DataClient.AssemblyInfoInputs.cache new file mode 100644 index 0000000..1389bef --- /dev/null +++ b/DataClient/obj/Debug/net5.0/DataClient.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +cc24590fdc5285a811154f711782659f77a86794 diff --git a/DataClient/obj/Debug/net5.0/DataClient.GeneratedMSBuildEditorConfig.editorconfig b/DataClient/obj/Debug/net5.0/DataClient.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..d7e2983 --- /dev/null +++ b/DataClient/obj/Debug/net5.0/DataClient.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,8 @@ +is_global = true +build_property.TargetFramework = net5.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.PublishSingleFile = +build_property.IncludeAllContentForSelfExtract = +build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows diff --git a/DataClient/obj/Debug/net5.0/DataClient.assets.cache b/DataClient/obj/Debug/net5.0/DataClient.assets.cache new file mode 100644 index 0000000..520dc20 Binary files /dev/null and b/DataClient/obj/Debug/net5.0/DataClient.assets.cache differ diff --git a/DataClient/obj/Debug/net5.0/DataClient.csprojAssemblyReference.cache b/DataClient/obj/Debug/net5.0/DataClient.csprojAssemblyReference.cache new file mode 100644 index 0000000..476a91a Binary files /dev/null and b/DataClient/obj/Debug/net5.0/DataClient.csprojAssemblyReference.cache differ diff --git a/DataClient/obj/project.assets.json b/DataClient/obj/project.assets.json new file mode 100644 index 0000000..2656e41 --- /dev/null +++ b/DataClient/obj/project.assets.json @@ -0,0 +1,444 @@ +{ + "version": 3, + "targets": { + "net5.0": { + "Microsoft.Extensions.Configuration.Abstractions/5.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "5.0.0" + }, + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": {} + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": {} + } + }, + "Microsoft.Extensions.DependencyInjection/5.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0" + }, + "compile": { + "lib/net5.0/Microsoft.Extensions.DependencyInjection.dll": {} + }, + "runtime": { + "lib/net5.0/Microsoft.Extensions.DependencyInjection.dll": {} + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {} + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {} + } + }, + "Microsoft.Extensions.Logging/5.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "5.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0", + "Microsoft.Extensions.Logging.Abstractions": "5.0.0", + "Microsoft.Extensions.Options": "5.0.0" + }, + "compile": { + "lib/netstandard2.1/Microsoft.Extensions.Logging.dll": {} + }, + "runtime": { + "lib/netstandard2.1/Microsoft.Extensions.Logging.dll": {} + } + }, + "Microsoft.Extensions.Logging.Abstractions/5.0.0": { + "type": "package", + "compile": { + "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {} + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {} + } + }, + "Microsoft.Extensions.Options/5.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0", + "Microsoft.Extensions.Primitives": "5.0.0" + }, + "compile": { + "lib/net5.0/Microsoft.Extensions.Options.dll": {} + }, + "runtime": { + "lib/net5.0/Microsoft.Extensions.Options.dll": {} + } + }, + "Microsoft.Extensions.Primitives/5.0.0": { + "type": "package", + "compile": { + "lib/netcoreapp3.0/Microsoft.Extensions.Primitives.dll": {} + }, + "runtime": { + "lib/netcoreapp3.0/Microsoft.Extensions.Primitives.dll": {} + } + }, + "Newtonsoft.Json/13.0.1": { + "type": "package", + "compile": { + "lib/netstandard2.0/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/netstandard2.0/Newtonsoft.Json.dll": {} + } + }, + "NLog/4.7.10": { + "type": "package", + "compile": { + "lib/netstandard2.0/NLog.dll": {} + }, + "runtime": { + "lib/netstandard2.0/NLog.dll": {} + } + }, + "NLog.Extensions.Logging/1.7.2": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "5.0.0", + "Microsoft.Extensions.Logging": "5.0.0", + "NLog": "4.7.9" + }, + "compile": { + "lib/net5.0/NLog.Extensions.Logging.dll": {} + }, + "runtime": { + "lib/net5.0/NLog.Extensions.Logging.dll": {} + } + } + } + }, + "libraries": { + "Microsoft.Extensions.Configuration.Abstractions/5.0.0": { + "sha512": "ETjSBHMp3OAZ4HxGQYpwyGsD8Sw5FegQXphi0rpoGMT74S4+I2mm7XJEswwn59XAaKOzC15oDSOWEE8SzDCd6Q==", + "type": "package", + "path": "microsoft.extensions.configuration.abstractions/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Configuration.Abstractions.dll", + "lib/net461/Microsoft.Extensions.Configuration.Abstractions.xml", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll", + "lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.xml", + "microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512", + "microsoft.extensions.configuration.abstractions.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.DependencyInjection/5.0.0": { + "sha512": "Rc2kb/p3Ze6cP6rhFC3PJRdWGbLvSHZc0ev7YlyeU6FmHciDMLrhoVoTUEzKPhN5ZjFgKF1Cf5fOz8mCMIkvpA==", + "type": "package", + "path": "microsoft.extensions.dependencyinjection/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.DependencyInjection.dll", + "lib/net461/Microsoft.Extensions.DependencyInjection.xml", + "lib/net5.0/Microsoft.Extensions.DependencyInjection.dll", + "lib/net5.0/Microsoft.Extensions.DependencyInjection.xml", + "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.dll", + "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.xml", + "lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.dll", + "lib/netstandard2.1/Microsoft.Extensions.DependencyInjection.xml", + "microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512", + "microsoft.extensions.dependencyinjection.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": { + "sha512": "ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==", + "type": "package", + "path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.DependencyInjection.Abstractions.dll", + "lib/net461/Microsoft.Extensions.DependencyInjection.Abstractions.xml", + "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll", + "lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.xml", + "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512", + "microsoft.extensions.dependencyinjection.abstractions.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.Logging/5.0.0": { + "sha512": "MgOwK6tPzB6YNH21wssJcw/2MKwee8b2gI7SllYfn6rvTpIrVvVS5HAjSU2vqSku1fwqRvWP0MdIi14qjd93Aw==", + "type": "package", + "path": "microsoft.extensions.logging/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Logging.dll", + "lib/net461/Microsoft.Extensions.Logging.xml", + "lib/netstandard2.0/Microsoft.Extensions.Logging.dll", + "lib/netstandard2.0/Microsoft.Extensions.Logging.xml", + "lib/netstandard2.1/Microsoft.Extensions.Logging.dll", + "lib/netstandard2.1/Microsoft.Extensions.Logging.xml", + "microsoft.extensions.logging.5.0.0.nupkg.sha512", + "microsoft.extensions.logging.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.Logging.Abstractions/5.0.0": { + "sha512": "NxP6ahFcBnnSfwNBi2KH2Oz8Xl5Sm2krjId/jRR3I7teFphwiUoUeZPwTNA21EX+5PtjqmyAvKaOeBXcJjcH/w==", + "type": "package", + "path": "microsoft.extensions.logging.abstractions/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Logging.Abstractions.dll", + "lib/net461/Microsoft.Extensions.Logging.Abstractions.xml", + "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll", + "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.xml", + "microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512", + "microsoft.extensions.logging.abstractions.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.Options/5.0.0": { + "sha512": "CBvR92TCJ5uBIdd9/HzDSrxYak+0W/3+yxrNg8Qm6Bmrkh5L+nu6m3WeazQehcZ5q1/6dDA7J5YdQjim0165zg==", + "type": "package", + "path": "microsoft.extensions.options/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Options.dll", + "lib/net461/Microsoft.Extensions.Options.xml", + "lib/net5.0/Microsoft.Extensions.Options.dll", + "lib/net5.0/Microsoft.Extensions.Options.xml", + "lib/netstandard2.0/Microsoft.Extensions.Options.dll", + "lib/netstandard2.0/Microsoft.Extensions.Options.xml", + "microsoft.extensions.options.5.0.0.nupkg.sha512", + "microsoft.extensions.options.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Microsoft.Extensions.Primitives/5.0.0": { + "sha512": "cI/VWn9G1fghXrNDagX9nYaaB/nokkZn0HYAawGaELQrl8InSezfe9OnfPZLcJq3esXxygh3hkq2c3qoV3SDyQ==", + "type": "package", + "path": "microsoft.extensions.primitives/5.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/net461/Microsoft.Extensions.Primitives.dll", + "lib/net461/Microsoft.Extensions.Primitives.xml", + "lib/netcoreapp3.0/Microsoft.Extensions.Primitives.dll", + "lib/netcoreapp3.0/Microsoft.Extensions.Primitives.xml", + "lib/netstandard2.0/Microsoft.Extensions.Primitives.dll", + "lib/netstandard2.0/Microsoft.Extensions.Primitives.xml", + "microsoft.extensions.primitives.5.0.0.nupkg.sha512", + "microsoft.extensions.primitives.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "Newtonsoft.Json/13.0.1": { + "sha512": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==", + "type": "package", + "path": "newtonsoft.json/13.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.md", + "lib/net20/Newtonsoft.Json.dll", + "lib/net20/Newtonsoft.Json.xml", + "lib/net35/Newtonsoft.Json.dll", + "lib/net35/Newtonsoft.Json.xml", + "lib/net40/Newtonsoft.Json.dll", + "lib/net40/Newtonsoft.Json.xml", + "lib/net45/Newtonsoft.Json.dll", + "lib/net45/Newtonsoft.Json.xml", + "lib/netstandard1.0/Newtonsoft.Json.dll", + "lib/netstandard1.0/Newtonsoft.Json.xml", + "lib/netstandard1.3/Newtonsoft.Json.dll", + "lib/netstandard1.3/Newtonsoft.Json.xml", + "lib/netstandard2.0/Newtonsoft.Json.dll", + "lib/netstandard2.0/Newtonsoft.Json.xml", + "newtonsoft.json.13.0.1.nupkg.sha512", + "newtonsoft.json.nuspec", + "packageIcon.png" + ] + }, + "NLog/4.7.10": { + "sha512": "rcegW7kYOCjl7wX0SzsqpPBqnJ51JKi1WkYb6QBVX0Wc5IgH19Pv4t/co+T0s06OS0Ne44xgkY/mHg0PdrmJow==", + "type": "package", + "path": "nlog/4.7.10", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/monoandroid44/NLog.dll", + "lib/monoandroid44/NLog.xml", + "lib/net35/NLog.dll", + "lib/net35/NLog.xml", + "lib/net40-client/NLog.dll", + "lib/net40-client/NLog.xml", + "lib/net45/NLog.dll", + "lib/net45/NLog.xml", + "lib/netstandard1.3/NLog.dll", + "lib/netstandard1.3/NLog.xml", + "lib/netstandard1.5/NLog.dll", + "lib/netstandard1.5/NLog.xml", + "lib/netstandard2.0/NLog.dll", + "lib/netstandard2.0/NLog.xml", + "lib/sl4/NLog.dll", + "lib/sl4/NLog.xml", + "lib/sl5/NLog.dll", + "lib/sl5/NLog.xml", + "lib/wp8/NLog.dll", + "lib/wp8/NLog.xml", + "lib/xamarinios10/NLog.dll", + "lib/xamarinios10/NLog.xml", + "nlog.4.7.10.nupkg.sha512", + "nlog.nuspec" + ] + }, + "NLog.Extensions.Logging/1.7.2": { + "sha512": "0y1QziAUCdePQc4itPOQF3xDcs0iE9NHlIK0hE0eA0+Ef6E9dnJDPveNu7w2ckYaDfJIFHpOoLK8sZmNEyiBCw==", + "type": "package", + "path": "nlog.extensions.logging/1.7.2", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "N.png", + "lib/net451/NLog.Extensions.Logging.dll", + "lib/net451/NLog.Extensions.Logging.xml", + "lib/net461/NLog.Extensions.Logging.dll", + "lib/net461/NLog.Extensions.Logging.xml", + "lib/net5.0/NLog.Extensions.Logging.dll", + "lib/net5.0/NLog.Extensions.Logging.xml", + "lib/netcoreapp3.0/NLog.Extensions.Logging.dll", + "lib/netcoreapp3.0/NLog.Extensions.Logging.xml", + "lib/netstandard1.3/NLog.Extensions.Logging.dll", + "lib/netstandard1.3/NLog.Extensions.Logging.xml", + "lib/netstandard1.5/NLog.Extensions.Logging.dll", + "lib/netstandard1.5/NLog.Extensions.Logging.xml", + "lib/netstandard2.0/NLog.Extensions.Logging.dll", + "lib/netstandard2.0/NLog.Extensions.Logging.xml", + "nlog.extensions.logging.1.7.2.nupkg.sha512", + "nlog.extensions.logging.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "net5.0": [ + "NLog >= 4.7.10", + "NLog.Extensions.Logging >= 1.7.2", + "Newtonsoft.Json >= 13.0.1" + ] + }, + "packageFolders": { + "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": {} + }, + "project": { + "version": "0.0.3", + "restore": { + "projectUniqueName": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", + "projectName": "DataClient", + "projectPath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", + "packagesPath": "C:\\Users\\google\\.nuget\\packages\\", + "outputPath": "D:\\GIT\\ASCKU_PC\\DataClient\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages", + "C:\\Program Files (x86)\\Microsoft\\Xamarin\\NuGet\\", + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], + "configFilePaths": [ + "C:\\Users\\google\\AppData\\Roaming\\NuGet\\NuGet.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\\Xamarin.Offline.config" + ], + "originalTargetFrameworks": [ + "net5.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "dependencies": { + "NLog": { + "target": "Package", + "version": "[4.7.10, )" + }, + "NLog.Extensions.Logging": { + "target": "Package", + "version": "[1.7.2, )" + }, + "Newtonsoft.Json": { + "target": "Package", + "version": "[13.0.1, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.201\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/DataClient/obj/project.nuget.cache b/DataClient/obj/project.nuget.cache new file mode 100644 index 0000000..1486ebf --- /dev/null +++ b/DataClient/obj/project.nuget.cache @@ -0,0 +1,19 @@ +{ + "version": 2, + "dgSpecHash": "fLzCMyL0TTYR6ScHYw8lseE4tuHRjlfRhsrbzgdqw/qeVRrQYigyT797G0cUiPOmrt1GVD0KWz3n3AZIE22bzQ==", + "success": true, + "projectFilePath": "D:\\GIT\\ASCKU_PC\\DataClient\\DataClient.csproj", + "expectedPackageFiles": [ + "C:\\Users\\google\\.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\\google\\.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\\google\\.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\\google\\.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\\google\\.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" + ], + "logs": [] +} \ No newline at end of file diff --git a/Tests/bin/Debug/netcoreapp3.1/04.txt b/Tests/bin/Debug/netcoreapp3.1/04.txt new file mode 100644 index 0000000..0de3bad --- /dev/null +++ b/Tests/bin/Debug/netcoreapp3.1/04.txt @@ -0,0 +1,2 @@ +2021-05-26 11:44:42.8 035 Отс. связь ГМП 01 +2021-05-26 11:44:43.4 035 Отс. связь ГМП 00