示例#1
0
        public override bool Execute()
        {
#if DEBUG
            if (!System.Diagnostics.Debugger.IsAttached)
            {
                System.Diagnostics.Debugger.Launch();
            }
#endif

            try {
                #region Setup parameters

                if (Input == null)
                {
                    this.Log.LogError("Input parameter must be specified"); return(false);
                }

                AsmMeta.AsmMeta asmmeta = new AsmMeta.AsmMeta(this.ErrorLogger);
                asmmeta.options.GeneralArguments.Add(Input);
                asmmeta.options.output = Output;
                asmmeta.options.includeSourceTextInContract = IncludeSourceTextInContracts;
                asmmeta.options.writePDB = WritePDB;
                if (ResolvedPaths != null)
                {
                    foreach (var lp in ResolvedPaths)
                    {
                        asmmeta.options.resolvedPaths.Add(lp.ItemSpec);
                    }
                }
                if (LibPaths != null)
                {
                    foreach (var lp in LibPaths)
                    {
                        asmmeta.options.libPaths.Add(lp.ItemSpec);
                    }
                }
                asmmeta.options.doBreak = Break;
                #endregion

                var result = asmmeta.Run();

                return(result == 0);
            } catch (Exception e) {
                this.Log.LogError("Exception: {0} caught", e.Message);
                return(false);
            }
        }
示例#2
0
    public override bool Execute() {

#if DEBUG
      if (!System.Diagnostics.Debugger.IsAttached)
      {
        System.Diagnostics.Debugger.Launch();
      }
#endif

      try {
        #region Setup parameters

        if (Input == null) { this.Log.LogError("Input parameter must be specified"); return false; }

        AsmMeta.AsmMeta asmmeta = new AsmMeta.AsmMeta(this.ErrorLogger);
        asmmeta.options.GeneralArguments.Add(Input);
        asmmeta.options.output = Output;
        asmmeta.options.includeSourceTextInContract = IncludeSourceTextInContracts;
        asmmeta.options.writePDB = WritePDB;
        if (ResolvedPaths!= null) {
          foreach (var lp in ResolvedPaths)
          {
            asmmeta.options.resolvedPaths.Add(lp.ItemSpec);
          }
        }
        if (LibPaths != null)
        {
          foreach (var lp in LibPaths)
          {
            asmmeta.options.libPaths.Add(lp.ItemSpec);
          }
        }
        asmmeta.options.doBreak = Break;
        #endregion

        var result = asmmeta.Run();

        return (result == 0);
      } catch (Exception e) {
        this.Log.LogError("Exception: {0} caught", e.Message);
        return false;
      }
    }