aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-09 18:07:56 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-09 18:07:56 +0300
commite1236499b485a69648bea4d7871aa185e5dae745 (patch)
tree8cd4ccd7d272c8c4e61d4bd6bcba434eb9522b85 /Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs
parent2a459c79e90a2ade3f1dac1ae4541c0f4d74965c (diff)
downloadTango-e1236499b485a69648bea4d7871aa185e5dae745.tar.gz
Tango-e1236499b485a69648bea4d7871aa185e5dae745.zip
New TemporaryManager !
Diffstat (limited to 'Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs')
-rw-r--r--Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs
index 65ce25300..d58d21ea9 100644
--- a/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs
+++ b/Software/Visual_Studio/Tango.Protobuf/ProtoCompiler.cs
@@ -7,6 +7,7 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Helpers;
+using Tango.Core.IO;
using Tango.Logging;
namespace Tango.Protobuf
@@ -56,7 +57,7 @@ namespace Tango.Protobuf
{
logManager.Log("Compiling file " + inputFile);
- String tmpPath = PathHelper.GetTempFolderPath();
+ var tmpPath = TemporaryManager.Default.CreateFolder();
logManager.Log("Temp path: " + tmpPath);
@@ -123,7 +124,7 @@ namespace Tango.Protobuf
}
- if (PathHelper.TryDeleteFolder(tmpPath))
+ if (tmpPath.Delete())
{
logManager.Log("Removed temp path: " + tmpPath);
}
@@ -230,7 +231,7 @@ namespace Tango.Protobuf
ImportsFolders.Clear();
ImportsFolders.AddRange(Directory.GetDirectories(sourceFolder, "*.*", SearchOption.AllDirectories));
- String tempPath = PathHelper.GetTempFolderPath();
+ var tempPath = TemporaryManager.Default.CreateFolder();
foreach (var file in Directory.GetFiles(sourceFolder, "*.proto", SearchOption.AllDirectories))
{
@@ -247,7 +248,7 @@ namespace Tango.Protobuf
var result = CompileFolderDefault(tempPath, tempPath, fileResults);
- PathHelper.TryDeleteFolder(tempPath);
+ tempPath.Delete();
logManager.Log(Path.GetFileName(sourceFolder) + "compiled!");