Skip to content

Commit

Permalink
Добавил возможность работы накатчика при установленой VS 2022.
Browse files Browse the repository at this point in the history
Удалил коиента Mq (не актуально)
Добавил код генерации классов из xsd (удалено из Cav.Core)
Обновил зависимости.
  • Loading branch information
ChernenkoAV committed Apr 10, 2023
1 parent 3fda972 commit 0438481
Show file tree
Hide file tree
Showing 22 changed files with 342 additions and 1,211 deletions.
207 changes: 102 additions & 105 deletions src/Arcas.BL/Arcas.BL.csproj
Original file line number Diff line number Diff line change
@@ -1,108 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B4E45987-D126-40AB-A6EC-2B1DFB0B5F73}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Arcas.BL</RootNamespace>
<AssemblyName>Arcas.BL</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<OutputPath>..\_Build\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>false</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\cav.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cav.Core" Version="7.3.6" />
<PackageReference Include="Cav.WinForms" Version="4.0.1" />
<PackageReference Include="Autoupdater.NET.Official" Version="*" />
<PackageReference Include="IBMMQDotnetClient" Version="*" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.TeamFoundation.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.ProjectManagement, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.ProjectManagement.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Common, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Common.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Controls, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Controls.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="CsGenFromWsdlXsd.cs" />
<Compile Include="IbmMq\IbmMqClient.cs" />
<Compile Include="IbmMq\MqBL.cs" />
<Compile Include="IbmMq\MqMessageGeneric.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingClass.cs" />
<Compile Include="TfsDBSaveBL.cs" />
<Compile Include="TFS\AssemblyResolverT.cs" />
<Compile Include="TFS\TFSRoutine.cs" />
<Compile Include="UpdaterT.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B4E45987-D126-40AB-A6EC-2B1DFB0B5F73}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Arcas.BL</RootNamespace>
<AssemblyName>Arcas.BL</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<OutputPath>..\_Build\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>false</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\cav.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cav.Core" Version="8.11.2" />
<PackageReference Include="Cav.WinForms" Version="5.1.0" />
<PackageReference Include="Autoupdater.NET.Official" Version="*" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.TeamFoundation.Client">
<HintPath>c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.ProjectManagement">
<HintPath>c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.ProjectManagement.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Client">
<HintPath>c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Common">
<HintPath>c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Common.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.VersionControl.Controls">
<HintPath>c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.VersionControl.Controls.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.Client">
<HintPath>c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="CsGenFromWsdlXsd.cs" />
<Compile Include="DynamicCodeHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingClass.cs" />
<Compile Include="TfsDBSaveBL.cs" />
<Compile Include="TFS\AssemblyResolverT.cs" />
<Compile Include="TFS\TFSRoutine.cs" />
<Compile Include="UpdaterT.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
24 changes: 0 additions & 24 deletions src/Arcas.BL/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,11 @@ namespace Arcas
public class Config : ProgramSettingsBase<Config>
#pragma warning restore CS0618 // Тип или член устарел
{
/// <summary>
/// Последняя использованная конфигурация при накатке БД
/// </summary>
public String SelestedTFSDB { get; set; }

/// <summary>
/// Настройки накатки + сохранение состояние ввода.
/// </summary>
public UpdaterDbSetting UpdaterDb { get; set; }

/// <summary>
/// Последние успешно использованные настройки при работе с Mq
/// </summary>
public MqSettingT MqSets { get; set; }
/// <summary>
/// Коллекция настроек связок TFS-DB
/// </summary>
public List<TfsDbLink> TfsDbSets { get; set; }

/// <summary>
/// Настройки для генаратора из wsdl и xsd
/// </summary>
Expand Down Expand Up @@ -70,14 +56,4 @@ public struct WsdlXsdGenSettingT
public string Xsd_PathToSaveFile { get; set; }
public string Xsd_Namespace { get; set; }
}

public struct MqSettingT
{
public string Host { get; set; }
public string ManagerName { get; set; }
public string ChannelName { get; set; }
public string QueueName { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
}
}
13 changes: 3 additions & 10 deletions src/Arcas.BL/CsGenFromWsdlXsd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using System.Xml.Linq;
using System.Xml.Schema;
using Cav;
using Cav.DynamicCode;
using WebDescription = System.Web.Services.Description;

namespace Arcas.BL
Expand Down Expand Up @@ -127,7 +126,7 @@ private string checkAndPrepareData(
var tempPath = Path.Combine(DomainContext.TempPath, uri.ComputeMD5ChecksumString().ToString());

if (Directory.Exists(tempPath))
Utils.DeleteDirectory(tempPath);
tempPath.DeleteDirectory();

Directory.CreateDirectory(tempPath);

Expand Down Expand Up @@ -279,10 +278,7 @@ private IEnumerable<String> downloadImport(string filePath, string tempDir, Uri
string importName;
foreach (var item in xdocfile.Descendants(xsdNS + "import"))
{
var locationAttrib = item.Attribute("schemaLocation");

if (locationAttrib == null)
throw new ArgumentException($"Отсутствует атрибут schemaLocation в элементе {item.Name}");
var locationAttrib = item.Attribute("schemaLocation") ?? throw new ArgumentException($"Отсутствует атрибут schemaLocation в элементе {item.Name}");

if (locationAttrib.Value.IsNullOrWhiteSpace())
throw new ArgumentException($"Не заполнен атрибут schemaLocation в элементе {item.Name}");
Expand All @@ -299,10 +295,7 @@ private IEnumerable<String> downloadImport(string filePath, string tempDir, Uri

foreach (var item in xdocfile.Descendants(wsdlNS + "import").ToArray())
{
var locationAttrib = item.Attribute("location");

if (locationAttrib == null)
throw new ArgumentException($"Отсутствует атрибут location в элементе {item.Name}");
var locationAttrib = item.Attribute("location") ?? throw new ArgumentException($"Отсутствует атрибут location в элементе {item.Name}");

if (locationAttrib.Value.IsNullOrWhiteSpace())
throw new ArgumentException($"Не заполнен атрибут location в элементе {item.Name}");
Expand Down
Loading

0 comments on commit 0438481

Please sign in to comment.