示例#1
0
 private void method_3()
 {
     foreach (string path in this.SourceFilePaths)
     {
         string[] array = File.ReadAllLines(path);
         for (int i = 0; i < array.Length; i++)
         {
             string text = array[i].Trim();
             if (text.StartsWith("//!CompilerOption|"))
             {
                 string[] array2 = text.Split(new char[]
                 {
                     '|'
                 }, StringSplitOptions.RemoveEmptyEntries);
                 string a = array2[1];
                 if (!(a == "AddRef"))
                 {
                     if (!(a == "Optimize"))
                     {
                         if (a == "Define" && array2.Length == 3 && !string.IsNullOrEmpty(array2[2]))
                         {
                             CompilerParameters options = this.Options;
                             options.CompilerOptions = options.CompilerOptions + " /d:" + array2[2] + ";";
                         }
                     }
                     else if (array2.Length == 3 && !string.IsNullOrEmpty(array2[2]) && array2[2] == "On" && !this.Options.CompilerOptions.Contains("/optimize;"))
                     {
                         this.Options.IncludeDebugInformation = false;
                         CompilerParameters options2 = this.Options;
                         options2.CompilerOptions += " /optimize";
                     }
                 }
                 else if (array2.Length == 3 && !string.IsNullOrEmpty(array2[2]) && array2[2].EndsWith(".dll") && !CodeCompiler.smethod_2(array2[2]) && !array2[2].ToLowerInvariant().Contains("hearthbuddy.exe"))
                 {
                     this.AddReference(array2[2]);
                 }
             }
         }
     }
 }