feat: 🙈 Add gitignore

This commit is contained in:
Louis Gallet 2023-10-12 09:34:33 +02:00
parent 10bca59719
commit ee1cbcfcda
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY
11 changed files with 126 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
bin/
obj/
/packages/
riderModule.iml
/_ReSharper.Caches/
# Rider
.idea/
*.sln.iml
*.csproj.iml
*.sln.DotSettings.user
*.csproj.DotSettings.user
*.sln.DotSettings
*.csproj.DotSettings
*.sln.DotSettings.user.DotSettings
*.csproj.DotSettings.user.DotSettings
*.sln.DotSettings.user.DotSettings.user
/Tests/bin/
/Tests/obj/
/Lecture/bin/
/Lecture/obj/

13
.idea/.idea.LectureTestingandDebug/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/contentModel.xml
/modules.xml
/.idea.LectureTestingandDebug.iml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -0,0 +1,16 @@
namespace Lecture.Exercises;
public class Conversion
{
public static int StringToInt(string number)
{
int res = 0;
for (int i = 0; i < 6; i++)
{
res = res * 10 + int.Parse(number[i].ToString());
}
return res;
}
}

10
Lecture/Lecture.csproj Normal file
View File

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

2
Lecture/Program.cs Normal file
View File

@ -0,0 +1,2 @@
Console.WriteLine(Lecture.Exercises.Conversion.StringToInt("123456"));
Console.WriteLine(Lecture.Exercises.Conversion.StringToInt("342523"));

View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lecture", "Lecture\Lecture.csproj", "{766C00F5-5826-4FB9-B209-76C4208C7E57}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{766C00F5-5826-4FB9-B209-76C4208C7E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{766C00F5-5826-4FB9-B209-76C4208C7E57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{766C00F5-5826-4FB9-B209-76C4208C7E57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{766C00F5-5826-4FB9-B209-76C4208C7E57}.Release|Any CPU.Build.0 = Release|Any CPU
{FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FEF2827B-7B2A-4DD1-B137-FA2C04914F9E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

1
README.md Normal file
View File

@ -0,0 +1 @@
# Programming CM about Exception and testing

25
Tests/Tests.csproj Normal file
View File

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0"/>
<PackageReference Include="xunit" Version="2.4.2"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

9
Tests/UnitTest1.cs Normal file
View File

@ -0,0 +1,9 @@
namespace Tests;
public class UnitTest1
{
[Fact]
public void Test1()
{
}
}

1
Tests/Usings.cs Normal file
View File

@ -0,0 +1 @@
global using Xunit;