Quellcode durchsuchen

first commit

master
Your Name vor 2 Jahren
Ursprung
Commit
da9676268d
44 geänderte Dateien mit 1338 neuen und 0 gelöschten Zeilen
  1. BIN
      SIE.Nuget/.vs/SIE.Nuget/v16/.suo
  2. BIN
      SIE.Nuget/.vs/SIE.Nuget/v16/TestStore/0/003.testlog
  3. BIN
      SIE.Nuget/.vs/SIE.Nuget/v16/TestStore/0/testlog.manifest
  4. +36
    -0
      SIE.Nuget/SIE.IVSDK/Properties/AssemblyInfo.cs
  5. +49
    -0
      SIE.Nuget/SIE.IVSDK/SIE.IVSDK.csproj
  6. +14
    -0
      SIE.Nuget/SIE.IVSDK/Services/IPathService.cs
  7. +13
    -0
      SIE.Nuget/SIE.IVSDK/Services/ISolutionService.cs
  8. +37
    -0
      SIE.Nuget/SIE.Nuget.sln
  9. +20
    -0
      SIE.Nuget/SIE.VSDK.Test/Properties/AssemblyInfo.cs
  10. +79
    -0
      SIE.Nuget/SIE.VSDK.Test/SIE.VSDK.Test.csproj
  11. +120
    -0
      SIE.Nuget/SIE.VSDK.Test/SolutionServiceTest.cs
  12. +23
    -0
      SIE.Nuget/SIE.VSDK.Test/app.config
  13. +5
    -0
      SIE.Nuget/SIE.VSDK.Test/packages.config
  14. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/DirectoryDestinationIsEmptyException.cs
  15. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/DirectoryDestinationIsNullException.cs
  16. +22
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/DirectoryDestinationNotFoundException.cs
  17. +18
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/InvalideDirectoryDestinationException.cs
  18. +22
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/ExtensionNewSolutionException.cs
  19. +18
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/ExtensionSolutionPathException.cs
  20. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/InvalidSolutionPathException.cs
  21. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/NewSolutionIsEmptyException.cs
  22. +18
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/NewSolutionIsNullException.cs
  23. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathIsEmptyException.cs
  24. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathIsNotAFileException.cs
  25. +21
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathIsNullException.cs
  26. +23
    -0
      SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathNotFoundException.cs
  27. +44
    -0
      SIE.Nuget/SIE.VSDK/Extensions/DirectoryInfoExtensions.cs
  28. +36
    -0
      SIE.Nuget/SIE.VSDK/Properties/AssemblyInfo.cs
  29. +174
    -0
      SIE.Nuget/SIE.VSDK/SIE.VSDK.csproj
  30. +36
    -0
      SIE.Nuget/SIE.VSDK/Services/PathService.cs
  31. +104
    -0
      SIE.Nuget/SIE.VSDK/Services/SolutionService.cs
  32. +23
    -0
      SIE.Nuget/SIE.VSDK/app.config
  33. +32
    -0
      SIE.Nuget/SIE.VSDK/packages.config
  34. BIN
      WebApplication1/.vs/WebApplication1/DesignTimeBuild/.dtbcache.v2
  35. BIN
      WebApplication1/.vs/WebApplication1/v16/.suo
  36. +25
    -0
      WebApplication1/WebApplication1.sln
  37. +39
    -0
      WebApplication1/WebApplication1/Controllers/WeatherForecastController.cs
  38. +26
    -0
      WebApplication1/WebApplication1/Program.cs
  39. +31
    -0
      WebApplication1/WebApplication1/Properties/launchSettings.json
  40. +59
    -0
      WebApplication1/WebApplication1/Startup.cs
  41. +15
    -0
      WebApplication1/WebApplication1/WeatherForecast.cs
  42. +11
    -0
      WebApplication1/WebApplication1/WebApplication1.csproj
  43. +9
    -0
      WebApplication1/WebApplication1/appsettings.Development.json
  44. +10
    -0
      WebApplication1/WebApplication1/appsettings.json

BIN
SIE.Nuget/.vs/SIE.Nuget/v16/.suo Datei anzeigen


BIN
SIE.Nuget/.vs/SIE.Nuget/v16/TestStore/0/003.testlog Datei anzeigen


BIN
SIE.Nuget/.vs/SIE.Nuget/v16/TestStore/0/testlog.manifest Datei anzeigen


+ 36
- 0
SIE.Nuget/SIE.IVSDK/Properties/AssemblyInfo.cs Datei anzeigen

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Les informations générales relatives à un assembly dépendent de
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("SIE.IVSDK")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SIE.IVSDK")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
[assembly: ComVisible(false)]

// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
[assembly: Guid("28110bdb-998e-42d3-9732-f5cb7740f6b9")]

// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
//
// Version principale
// Version secondaire
// Numéro de build
// Révision
//
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 49
- 0
SIE.Nuget/SIE.IVSDK/SIE.IVSDK.csproj Datei anzeigen

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{28110BDB-998E-42D3-9732-F5CB7740F6B9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SIE.IVSDK</RootNamespace>
<AssemblyName>SIE.IVSDK</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Services\IPathService.cs" />
<Compile Include="Services\ISolutionService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 14
- 0
SIE.Nuget/SIE.IVSDK/Services/IPathService.cs Datei anzeigen

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.IVSDK.Services
{
public interface IPathService
{
bool IsValidPath(string path, bool allowRelativePaths = false);
}
}

+ 13
- 0
SIE.Nuget/SIE.IVSDK/Services/ISolutionService.cs Datei anzeigen

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.IVSDK.Services
{
public interface ISolutionService
{
void CreateProjectTemplatesFromSolution(string solutionPath, string directoryDestinationPath, string newSolutionName);
}
}

+ 37
- 0
SIE.Nuget/SIE.Nuget.sln Datei anzeigen

@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32901.82
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SIE.VSDK", "SIE.VSDK\SIE.VSDK.csproj", "{4BF7E556-D8FA-46EF-9655-13077E8D1BA6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SIE.IVSDK", "SIE.IVSDK\SIE.IVSDK.csproj", "{28110BDB-998E-42D3-9732-F5CB7740F6B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SIE.VSDK.Test", "SIE.VSDK.Test\SIE.VSDK.Test.csproj", "{67ABA05D-465B-4F20-8112-A9D282541C80}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4BF7E556-D8FA-46EF-9655-13077E8D1BA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4BF7E556-D8FA-46EF-9655-13077E8D1BA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4BF7E556-D8FA-46EF-9655-13077E8D1BA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4BF7E556-D8FA-46EF-9655-13077E8D1BA6}.Release|Any CPU.Build.0 = Release|Any CPU
{28110BDB-998E-42D3-9732-F5CB7740F6B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28110BDB-998E-42D3-9732-F5CB7740F6B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28110BDB-998E-42D3-9732-F5CB7740F6B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28110BDB-998E-42D3-9732-F5CB7740F6B9}.Release|Any CPU.Build.0 = Release|Any CPU
{67ABA05D-465B-4F20-8112-A9D282541C80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67ABA05D-465B-4F20-8112-A9D282541C80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67ABA05D-465B-4F20-8112-A9D282541C80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67ABA05D-465B-4F20-8112-A9D282541C80}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3437A0E5-7E74-48B6-9764-DF74597AA8F4}
EndGlobalSection
EndGlobal

+ 20
- 0
SIE.Nuget/SIE.VSDK.Test/Properties/AssemblyInfo.cs Datei anzeigen

@@ -0,0 +1,20 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("SIE.VSDK.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SIE.VSDK.Test")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]

[assembly: Guid("67aba05d-465b-4f20-8112-a9d282541c80")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 79
- 0
SIE.Nuget/SIE.VSDK.Test/SIE.VSDK.Test.csproj Datei anzeigen

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" />
<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>{67ABA05D-465B-4F20-8112-A9D282541C80}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SIE.VSDK.Test</RootNamespace>
<AssemblyName>SIE.VSDK.Test</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="SolutionServiceTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SIE.IVSDK\SIE.IVSDK.csproj">
<Project>{28110BDB-998E-42D3-9732-F5CB7740F6B9}</Project>
<Name>SIE.IVSDK</Name>
</ProjectReference>
<ProjectReference Include="..\SIE.VSDK\SIE.VSDK.csproj">
<Project>{4bf7e556-d8fa-46ef-9655-13077e8d1ba6}</Project>
<Name>SIE.VSDK</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" />
</Project>

+ 120
- 0
SIE.Nuget/SIE.VSDK.Test/SolutionServiceTest.cs Datei anzeigen

@@ -0,0 +1,120 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SIE.IVSDK.Services;
using SIE.VSDK.Exceptions.DirectoryDestination;
using SIE.VSDK.Exceptions.Solution;
using SIE.VSDK.Services;
using System;
using System.IO;

namespace SIE.VSDK.Test
{
[TestClass]
public class SolutionServiceTest
{
private readonly ISolutionService _solutionService;
private string dirTest = Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetParent(Directory.GetCurrentDirectory()).FullName).FullName).FullName).FullName;
public SolutionServiceTest()
{
IPathService pathService = new PathService();
_solutionService = new SolutionService(pathService);
}

[TestMethod]
[ExpectedException(typeof(SolutionPathIsNullException), "Le chemin de la solution passé en premier paramètre est null !")]
public void TestSolutionPathIsNullError01()
{
_solutionService.CreateProjectTemplatesFromSolution(null, "","");
}
[TestMethod]
[ExpectedException(typeof(SolutionPathIsEmptyException), "Le chemin de la solution passé en premier paramètre eqt vide !")]
public void TestSolutionPathIsNotAFileError02()
{
_solutionService.CreateProjectTemplatesFromSolution(" ", "","");
}
[TestMethod]
[ExpectedException(typeof(InvalidSolutionPathException), "Le chemin de la solution passé en premier paramètre n'est pas valide !")]
public void TestInvalidSolutionPathError03()
{
_solutionService.CreateProjectTemplatesFromSolution(@"C:/abc*d.txt", "","");
}
[TestMethod]
[ExpectedException(typeof(ExtensionSolutionPathException), "Le chemin de la solution passé en premier paramètre n'existe pas !")]
public void ExtensionSolutionPathError04()
{
_solutionService.CreateProjectTemplatesFromSolution(@"C:/toto.txt", "","");
}

[TestMethod]
[ExpectedException(typeof(SolutionPathIsNotAFileException), "Le chemin de la solution passé en premier paramètre n'existe pas !")]
public void SolutionPathIsNotAFileError05()
{
_solutionService.CreateProjectTemplatesFromSolution(@"C:/toto.sln", "","");
}
[TestMethod]
[ExpectedException(typeof(DirectoryDestinationIsNullException), "Le chemin de destination passé en second paramètre ne doit pas être null !")]
public void DirectoryDestinationIsNullError06()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), null,"");
}
[TestMethod]
[ExpectedException(typeof(DirectoryDestinationIsEmptyException), "Le chemin de destination passé en second paramètre ne doit pas être vide !")]
public void DirectoryDestinationIsEmptyError07()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), " ","");
}
[TestMethod]
[ExpectedException(typeof(InvalideDirectoryDestinationException), "Le chemin de destination passé en second paramètre ne doit pas être vide !")]
public void InvalideDirectoryDestinationError08()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), @"C:/abc*d","");
}
[TestMethod]
[ExpectedException(typeof(DirectoryDestinationNotFoundException), "Le chemin de destination passé en second paramètre est un chemin inexistant !")]
public void DirectoryDestinationNotFoundError09()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), @"C:/abcd","");
}
[TestMethod]
[ExpectedException(typeof(NewSolutionIsNullException), "La nouvelle solution passée en second paramètre est null !")]
public void NewSolutionIsNullError10()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),null);
}
[TestMethod]
[ExpectedException(typeof(NewSolutionIsEmptyException), "La nouvelle solution passée en second paramètre est vide !")]
public void NewSolutionIsEmptyError11()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), " ");
}
[TestMethod]
[ExpectedException(typeof(ExtensionNewSolutionException), "La nouvelle solution passée en second paramètre n'as pas l'extension sln!")]
public void ExtensionNewSolutioError12()
{

_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "toto.sn");
}

[TestMethod]
public void TestSolutionNominal01()
{
_solutionService.CreateProjectTemplatesFromSolution(Path.Combine(dirTest, "WebApplication1", "WebApplication1.sln"), Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Test.sln");
}









}
}

+ 23
- 0
SIE.Nuget/SIE.VSDK.Test/app.config Datei anzeigen

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

+ 5
- 0
SIE.Nuget/SIE.VSDK.Test/packages.config Datei anzeigen

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSTest.TestAdapter" version="2.1.2" targetFramework="net48" />
<package id="MSTest.TestFramework" version="2.1.2" targetFramework="net48" />
</packages>

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/DirectoryDestinationIsEmptyException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.DirectoryDestination
{
public class DirectoryDestinationIsEmptyException:Exception
{
public DirectoryDestinationIsEmptyException(string message)
: base(message)
{
}

public DirectoryDestinationIsEmptyException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/DirectoryDestinationIsNullException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.DirectoryDestination
{
public class DirectoryDestinationIsNullException:Exception
{
public DirectoryDestinationIsNullException(string message)
: base(message)
{
}

public DirectoryDestinationIsNullException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 22
- 0
SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/DirectoryDestinationNotFoundException.cs Datei anzeigen

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.DirectoryDestination
{
public class DirectoryDestinationNotFoundException : Exception
{

public DirectoryDestinationNotFoundException(string message)
: base(message)
{
}

public DirectoryDestinationNotFoundException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 18
- 0
SIE.Nuget/SIE.VSDK/Exceptions/DirectoryDestination/InvalideDirectoryDestinationException.cs Datei anzeigen

@@ -0,0 +1,18 @@
using System;

namespace SIE.VSDK.Exceptions.DirectoryDestination
{
public class InvalideDirectoryDestinationException:Exception
{

public InvalideDirectoryDestinationException(string message)
: base(message)
{
}

public InvalideDirectoryDestinationException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 22
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/ExtensionNewSolutionException.cs Datei anzeigen

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{
public class ExtensionNewSolutionException:Exception
{
public ExtensionNewSolutionException(string message)
: base(message)
{
}

public ExtensionNewSolutionException(string message, Exception inner)
: base(message, inner)
{
}
}

}

+ 18
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/ExtensionSolutionPathException.cs Datei anzeigen

@@ -0,0 +1,18 @@
using System;

namespace SIE.VSDK.Exceptions.Solution
{
public class ExtensionSolutionPathException:Exception
{

public ExtensionSolutionPathException(string message)
: base(message)
{
}

public ExtensionSolutionPathException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/InvalidSolutionPathException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{
public class InvalidSolutionPathException:Exception
{
public InvalidSolutionPathException(string message)
: base(message)
{
}

public InvalidSolutionPathException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/NewSolutionIsEmptyException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{
public class NewSolutionIsEmptyException: Exception
{
public NewSolutionIsEmptyException(string message)
: base(message)
{
}

public NewSolutionIsEmptyException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 18
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/NewSolutionIsNullException.cs Datei anzeigen

@@ -0,0 +1,18 @@
using System;


namespace SIE.VSDK.Exceptions.Solution
{
public class NewSolutionIsNullException:Exception
{
public NewSolutionIsNullException(string message)
: base(message)
{
}

public NewSolutionIsNullException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathIsEmptyException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{
public class SolutionPathIsEmptyException: Exception
{
public SolutionPathIsEmptyException(string message)
: base(message)
{
}

public SolutionPathIsEmptyException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathIsNotAFileException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{
public class SolutionPathIsNotAFileException :Exception
{
public SolutionPathIsNotAFileException(string message)
: base(message)
{
}

public SolutionPathIsNotAFileException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 21
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathIsNullException.cs Datei anzeigen

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{
public class SolutionPathIsNullException:Exception
{
public SolutionPathIsNullException(string message)
: base(message)
{
}

public SolutionPathIsNullException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 23
- 0
SIE.Nuget/SIE.VSDK/Exceptions/Solution/SolutionPathNotFoundException.cs Datei anzeigen

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Exceptions.Solution
{

public class SolutionPathNotFoundException : Exception
{

public SolutionPathNotFoundException(string message)
: base(message)
{
}

public SolutionPathNotFoundException(string message, Exception inner)
: base(message, inner)
{
}
}
}

+ 44
- 0
SIE.Nuget/SIE.VSDK/Extensions/DirectoryInfoExtensions.cs Datei anzeigen

@@ -0,0 +1,44 @@
using Microsoft.Build.Evaluation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SIE.VSDK.Extensions
{
public static class DirectoryInfoExtensions
{
public static void DeepCopy(this DirectoryInfo directory, string destinationDir)
{
foreach (string dir in Directory.GetDirectories(directory.FullName, "*", SearchOption.AllDirectories))
{
string dirToCreate = dir.Replace(directory.FullName, destinationDir);
Directory.CreateDirectory(dirToCreate);
}

foreach (string newPath in Directory.GetFiles(directory.FullName, "*.*", SearchOption.AllDirectories))
{
File.Copy(newPath, newPath.Replace(directory.FullName, destinationDir), true);
}
}
public static List<string> GetCsProjFiles(this DirectoryInfo directory)
{

List<string> listCsProj = new List<string>();
foreach (string newPath in Directory.GetFiles(directory.FullName, "*.csproj", SearchOption.AllDirectories))
{
ProjectCollection pc = new ProjectCollection();
Project project = pc.LoadProject(newPath, null);
var properties = project.Properties;
foreach (var property in properties)
{
string result = $"Property: \"{property.Name}\" Value: {property.UnevaluatedValue}";
}
listCsProj.Add(newPath);
}
return listCsProj;
}
}
}

+ 36
- 0
SIE.Nuget/SIE.VSDK/Properties/AssemblyInfo.cs Datei anzeigen

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Les informations générales relatives à un assembly dépendent de
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("SIE.VSDK")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SIE.VSDK")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
[assembly: ComVisible(false)]

// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
[assembly: Guid("4bf7e556-d8fa-46ef-9655-13077e8d1ba6")]

// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
//
// Version principale
// Version secondaire
// Numéro de build
// Révision
//
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 174
- 0
SIE.Nuget/SIE.VSDK/SIE.VSDK.csproj Datei anzeigen

@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{4BF7E556-D8FA-46EF-9655-13077E8D1BA6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SIE.VSDK</RootNamespace>
<AssemblyName>SIE.VSDK</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Build.15.1.1012\lib\net46\Microsoft.Build.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Build.Framework.15.1.1012\lib\net46\Microsoft.Build.Framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Build.Utilities.Core.15.1.1012\lib\net46\Microsoft.Build.Utilities.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IO.Redist, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IO.Redist.6.0.0\lib\net472\Microsoft.IO.Redist.dll</HintPath>
</Reference>
<Reference Include="Microsoft.NET.StringTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.NET.StringTools.17.3.1\lib\net472\Microsoft.NET.StringTools.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.6.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Configuration.ConfigurationManager.6.0.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Reflection.Metadata, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.Metadata.6.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Reflection.MetadataLoadContext, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.MetadataLoadContext.6.0.0\lib\net461\System.Reflection.MetadataLoadContext.dll</HintPath>
</Reference>
<Reference Include="System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.4.1.0\lib\net462\System.Runtime.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.4.1.0\lib\net462\System.Runtime.InteropServices.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
</Reference>
<Reference Include="System.Security.Permissions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Permissions.6.0.0\lib\net461\System.Security.Permissions.dll</HintPath>
</Reference>
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
</Reference>
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.6.0.0\lib\net461\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Dataflow, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Dataflow.6.0.0\lib\net461\System.Threading.Tasks.Dataflow.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Thread.4.0.0\lib\net46\System.Threading.Thread.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Exceptions\DirectoryDestination\DirectoryDestinationIsEmptyException.cs" />
<Compile Include="Exceptions\DirectoryDestination\InvalideDirectoryDestinationException.cs" />
<Compile Include="Exceptions\DirectoryDestination\DirectoryDestinationIsNullException.cs" />
<Compile Include="Exceptions\DirectoryDestination\DirectoryDestinationNotFoundException.cs" />
<Compile Include="Exceptions\Solution\ExtensionSolutionPathException.cs" />
<Compile Include="Exceptions\Solution\ExtensionNewSolutionException.cs" />
<Compile Include="Exceptions\Solution\InvalidSolutionPathException.cs" />
<Compile Include="Exceptions\Solution\NewSolutionIsEmptyException.cs" />
<Compile Include="Exceptions\Solution\NewSolutionIsNullException.cs" />
<Compile Include="Exceptions\Solution\SolutionPathIsNotAFileException.cs" />
<Compile Include="Exceptions\Solution\SolutionPathIsNullException.cs" />
<Compile Include="Exceptions\Solution\SolutionPathNotFoundException.cs" />
<Compile Include="Exceptions\Solution\SolutionPathIsEmptyException.cs" />
<Compile Include="Extensions\DirectoryInfoExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\PathService.cs" />
<Compile Include="Services\SolutionService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SIE.IVSDK\SIE.IVSDK.csproj">
<Project>{28110bdb-998e-42d3-9732-f5cb7740f6b9}</Project>
<Name>SIE.IVSDK</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Text.Json.6.0.0\build\System.Text.Json.targets" Condition="Exists('..\packages\System.Text.Json.6.0.0\build\System.Text.Json.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\System.Text.Json.6.0.0\build\System.Text.Json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Text.Json.6.0.0\build\System.Text.Json.targets'))" />
</Target>
</Project>

+ 36
- 0
SIE.Nuget/SIE.VSDK/Services/PathService.cs Datei anzeigen

@@ -0,0 +1,36 @@
using SIE.IVSDK.Services;
using System;
using System.IO;
using System.Text.RegularExpressions;

namespace SIE.VSDK.Services
{
public class PathService : IPathService
{
public bool IsValidPath(string path, bool allowRelativePaths = false)
{
bool isValid = true;

try
{
string fullPath = Path.GetFullPath(path);

if (allowRelativePaths)
{
isValid = Path.IsPathRooted(path);
}
else
{
string root = Path.GetPathRoot(path);
isValid = string.IsNullOrEmpty(root.Trim(new char[] { '\\', '/' })) == false;
}
}
catch (Exception ex)
{
isValid = false;
}

return isValid;
}
}
}

+ 104
- 0
SIE.Nuget/SIE.VSDK/Services/SolutionService.cs Datei anzeigen

@@ -0,0 +1,104 @@
using SIE.IVSDK.Services;
using SIE.VSDK.Exceptions.DirectoryDestination;
using SIE.VSDK.Exceptions.Solution;
using SIE.VSDK.Extensions;
using System.Collections.Generic;
using System.IO;


namespace SIE.VSDK.Services
{
public class SolutionService : ISolutionService
{
private readonly IPathService _pathService;
public SolutionService(IPathService pathService)
{
_pathService = pathService;
}
public void CreateProjectTemplatesFromSolution(string solutionPath, string directoryDestinationPath, string newSolutionName)
{

if(solutionPath==null)
{
throw new SolutionPathIsNullException($"Le chemin de la solution {Path.GetFileName(solutionPath)} ne doit pas être null !");
}
if(solutionPath.Trim() == string.Empty)
{
throw new SolutionPathIsEmptyException($"Le chemin de la solution {Path.GetFileName(solutionPath)} ne doit pas être vide !");
}
if (!_pathService.IsValidPath(solutionPath))
{
throw new InvalidSolutionPathException($"Le chemin de la solution {Path.GetFileName(solutionPath)} n'est pas valide !");
}
if (Path.GetExtension(solutionPath) != ".sln")
{
throw new ExtensionSolutionPathException($"Le chemin de la solution {Path.GetFileName(solutionPath)} doit être d'extension .sln !");
}

if (!File.Exists(solutionPath))
{
throw new SolutionPathIsNotAFileException($"Le chemin de la solution {Path.GetFileName(solutionPath)} doit être un fichier existant!");
}
if(directoryDestinationPath ==null)
{
throw new DirectoryDestinationIsNullException($"Le chemin de destination {directoryDestinationPath} ne doit pas être null !");
}
if(directoryDestinationPath.Trim()==string.Empty)
{
throw new DirectoryDestinationIsEmptyException($"Le chemin de destination {directoryDestinationPath} ne doit pas être vide !");
}
if(!_pathService.IsValidPath(directoryDestinationPath))
{
throw new InvalideDirectoryDestinationException($"Le chemin de destination {directoryDestinationPath} n'est pas valide !");

}
if(!Directory.Exists(directoryDestinationPath))
{
throw new DirectoryDestinationNotFoundException($"Le dossier de destination {directoryDestinationPath} n'existe pas!");
}
if (newSolutionName == null)
{
throw new NewSolutionIsNullException("Le nom de la nouvelle solution est null");
}
if (newSolutionName.Trim() == string.Empty)
{
throw new NewSolutionIsEmptyException("Le nom de la nouvelle solution est vide");
}
if (Path.GetExtension(newSolutionName) != ".sln")
{
throw new ExtensionNewSolutionException($"Le nom de la nouvelle solution {newSolutionName} doit être de type .sln !");
}
string VSDK_ECOLOCALE_directory = Path.Combine(directoryDestinationPath, "VSDK_ECOLOCALE");
if (!Directory.Exists(VSDK_ECOLOCALE_directory))
{
Directory.CreateDirectory(VSDK_ECOLOCALE_directory);
}
string TMP_TEMPLATE_directory = Path.Combine(VSDK_ECOLOCALE_directory, "TMP_TEMPLATE");
if (!Directory.Exists(TMP_TEMPLATE_directory))
{
Directory.CreateDirectory(TMP_TEMPLATE_directory);
}
string TMP_SLN_directory = Path.Combine(TMP_TEMPLATE_directory, Path.GetFileNameWithoutExtension(newSolutionName));
if (!Directory.Exists(TMP_SLN_directory))
{
Directory.CreateDirectory(TMP_SLN_directory);
}
DirectoryInfo sourceDir = new DirectoryInfo(Path.GetDirectoryName(solutionPath));
sourceDir.DeepCopy(TMP_SLN_directory);
string oldName = Path.Combine(TMP_SLN_directory, Path.GetFileName(solutionPath));
File.Delete(oldName);
sourceDir = new DirectoryInfo(Path.GetDirectoryName(TMP_SLN_directory));
List<string> csProjFiles = sourceDir.GetCsProjFiles();





}
}
}

+ 23
- 0
SIE.Nuget/SIE.VSDK/app.config Datei anzeigen

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

+ 32
- 0
SIE.Nuget/SIE.VSDK/packages.config Datei anzeigen

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net48" />
<package id="Microsoft.Build" version="15.1.1012" targetFramework="net48" />
<package id="Microsoft.Build.Framework" version="15.1.1012" targetFramework="net48" />
<package id="Microsoft.Build.Utilities.Core" version="15.1.1012" targetFramework="net48" />
<package id="Microsoft.IO.Redist" version="6.0.0" targetFramework="net48" />
<package id="Microsoft.NET.StringTools" version="17.3.1" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Collections" version="4.0.11" targetFramework="net48" />
<package id="System.Collections.Immutable" version="6.0.0" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="6.0.0" targetFramework="net48" />
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="net48" />
<package id="System.Globalization" version="4.0.11" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.Reflection.Metadata" version="6.0.0" targetFramework="net48" />
<package id="System.Reflection.MetadataLoadContext" version="6.0.0" targetFramework="net48" />
<package id="System.Runtime" version="4.1.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices" version="4.1.0" targetFramework="net48" />
<package id="System.Security.AccessControl" version="6.0.0" targetFramework="net48" />
<package id="System.Security.Permissions" version="6.0.0" targetFramework="net48" />
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net48" />
<package id="System.Text.Encodings.Web" version="6.0.0" targetFramework="net48" />
<package id="System.Text.Json" version="6.0.0" targetFramework="net48" />
<package id="System.Threading" version="4.0.11" targetFramework="net48" />
<package id="System.Threading.Tasks.Dataflow" version="6.0.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
<package id="System.Threading.Thread" version="4.0.0" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages>

BIN
WebApplication1/.vs/WebApplication1/DesignTimeBuild/.dtbcache.v2 Datei anzeigen


BIN
WebApplication1/.vs/WebApplication1/v16/.suo Datei anzeigen


+ 25
- 0
WebApplication1/WebApplication1.sln Datei anzeigen

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32901.82
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{026EBCAC-E688-48C9-BF66-8CB6ED08CEB9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{026EBCAC-E688-48C9-BF66-8CB6ED08CEB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{026EBCAC-E688-48C9-BF66-8CB6ED08CEB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{026EBCAC-E688-48C9-BF66-8CB6ED08CEB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{026EBCAC-E688-48C9-BF66-8CB6ED08CEB9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {04D889E7-D132-4513-ACE0-16E5C4CF0CA1}
EndGlobalSection
EndGlobal

+ 39
- 0
WebApplication1/WebApplication1/Controllers/WeatherForecastController.cs Datei anzeigen

@@ -0,0 +1,39 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};

private readonly ILogger<WeatherForecastController> _logger;

public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}

[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
}
}
}

+ 26
- 0
WebApplication1/WebApplication1/Program.cs Datei anzeigen

@@ -0,0 +1,26 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}

+ 31
- 0
WebApplication1/WebApplication1/Properties/launchSettings.json Datei anzeigen

@@ -0,0 +1,31 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:40762",
"sslPort": 44360
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WebApplication1": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

+ 59
- 0
WebApplication1/WebApplication1/Startup.cs Datei anzeigen

@@ -0,0 +1,59 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApplication1
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}

public IConfiguration Configuration { get; }

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{

services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebApplication1", Version = "v1" });
});
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "WebApplication1 v1"));
}

app.UseHttpsRedirection();

app.UseRouting();

app.UseAuthorization();

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}

+ 15
- 0
WebApplication1/WebApplication1/WeatherForecast.cs Datei anzeigen

@@ -0,0 +1,15 @@
using System;

namespace WebApplication1
{
public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

public string Summary { get; set; }
}
}

+ 11
- 0
WebApplication1/WebApplication1/WebApplication1.csproj Datei anzeigen

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup>

</Project>

+ 9
- 0
WebApplication1/WebApplication1/appsettings.Development.json Datei anzeigen

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

+ 10
- 0
WebApplication1/WebApplication1/appsettings.json Datei anzeigen

@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

Laden…
Abbrechen
Speichern