initial parsing implemented
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace TMI_practicum
|
||||
{
|
||||
@@ -6,7 +7,41 @@ namespace TMI_practicum
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args.Length < 1)
|
||||
{
|
||||
Console.WriteLine("Please enter a file.");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
if (!File.Exists(args[0]))
|
||||
{
|
||||
Console.WriteLine("File {0} not found.", args[0]);
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
Console.WriteLine("HOOOOOOOOOOOIIII");
|
||||
}
|
||||
|
||||
|
||||
private static void ParseFile(string path)
|
||||
{
|
||||
|
||||
int algoritme = 0;
|
||||
int nbCircles = 0;
|
||||
|
||||
using (StreamReader file = new StreamReader(path))
|
||||
{
|
||||
if (!int.TryParse(file.ReadLine(), out algoritme) || !int.TryParse(file.ReadLine(), out nbCircles))
|
||||
{
|
||||
throw new ArgumentException("An error occured parsing the input file.");
|
||||
}
|
||||
|
||||
string line;
|
||||
while ((line = file.ReadLine()) != null)
|
||||
{
|
||||
line.Split(' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -33,15 +33,23 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
4
TMI-practicum/packages.config
Normal file
4
TMI-practicum/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
</packages>
|
Reference in New Issue
Block a user