Skip to content

Commit

Permalink
Cleanup generated and dependencies (#95)
Browse files Browse the repository at this point in the history
* removed travis file, its not in use
* removed csproj.user file, they are user settings
* Removed experimental code?
No idea what this is for but, it is not called and looks like some very early test code for runtime compilation that somehow got included by mistake

* removed auto-generated documentation file
* removed unused packages
csharp was used by some experimental code, no idea what DataSetExtensions was used for
  • Loading branch information
nimrof authored Mar 30, 2024
1 parent 0c3f6ae commit c159e92
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 5,272 deletions.
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions EDSEditorGUI/EDSEditorGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="SourceGrid" Version="4.4.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<PropertyGroup>
<PreBuildEvent>git describe --tags --long --dirty &gt; "$(MSBuildProjectDirectory)\version.txt" || exit 0</PreBuildEvent>
Expand Down
13 changes: 0 additions & 13 deletions EDSEditorGUI/EDSEditorGUI.csproj.user

This file was deleted.

4 changes: 0 additions & 4 deletions EDSSharp/EDSSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@
<ItemGroup>
<ProjectReference Include="..\libEDSsharp\libEDSsharp.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
</Project>
7 changes: 0 additions & 7 deletions EDSSharp/EDSSharp.csproj.user

This file was deleted.

34 changes: 0 additions & 34 deletions libEDSsharp/CanOpenNodeExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1315,40 +1315,6 @@ string formatvaluewithdatatype(string defaultvalue, DataType dt, bool fixstring=
return "";
}
}

public static string ParseString(string input)
{
var provider = new Microsoft.CSharp.CSharpCodeProvider();
var parameters = new System.CodeDom.Compiler.CompilerParameters()
{
GenerateExecutable = false,
GenerateInMemory = true,
};

var code = @"
namespace Tmp
{
public class TmpClass
{
public static string GetValue()
{
return """ + input + @""";
}
}
}";

var compileResult = provider.CompileAssemblyFromSource(parameters, code);

if (compileResult.Errors.HasErrors)
{
throw new ArgumentException(compileResult.Errors.Cast<System.CodeDom.Compiler.CompilerError>().First(e => !e.IsWarning).ErrorText);
}

var asmb = compileResult.CompiledAssembly;
var method = asmb.GetType("Tmp.TmpClass").GetMethod("GetValue");

return method.Invoke(null, null) as string;
}
/// <summary>
/// Generates a valid C language variable name using input
/// </summary>
Expand Down
Loading

0 comments on commit c159e92

Please sign in to comment.