From 00a491d93733d4625ad329b2ba8237f445364b3f Mon Sep 17 00:00:00 2001 From: Mirta Date: Wed, 30 Dec 2020 16:39:52 +0200 Subject: merge --- .../Tango.Protobuf/Compilers/CCompiler.cs | 39 +--------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'Software/Visual_Studio/Tango.Protobuf/Compilers') diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs index 707466857..91f8d1502 100644 --- a/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; -using System.Text.RegularExpressions; using System.Threading.Tasks; using Tango.Core.Helpers; using Tango.Core.IO; @@ -16,11 +15,6 @@ namespace Tango.Protobuf.Compilers /// public class CCompiler : ProtoCompiler { - /// - /// Gets or sets a value indicating whether this will minimize the code by omitting hard coded strings. - /// - public bool Minimize { get; set; } - /// /// Gets the compiler language. /// @@ -100,38 +94,7 @@ namespace Tango.Protobuf.Compilers File.WriteAllText(file, str); } - var result = base.CompileFolder(temp.Path); - - if (Minimize) - { - MinimizeFolder(result); - } - - return result; - } - - private void MinimizeFolder(CompilerFolderResult folder) - { - foreach (var childFolder in folder.Results.OfType()) - { - MinimizeFolder(childFolder); - } - - foreach (var childFile in folder.Results.OfType()) - { - MinimizeFile(childFile); - } - } - - private void MinimizeFile(CompilerFileResult file) - { - file.Content = MinimizeCode(file.Content); - } - - private String MinimizeCode(String code) - { - Regex reg = new Regex("(?<=\")(\\w{1,})(?=\")"); - return reg.Replace(code, ""); + return base.CompileFolder(temp.Path); } } } -- cgit v1.3.1