Ejemplo n.º 1
0
 /// <summary>
 ///   Executes the task.
 /// </summary>
 public override bool Execute()
 {
     if (this.Model != null)
     {
         String output = Momc.Compile(this.Model.ItemSpec, this.ToDirectory.ItemSpec);
         if (output == null)
         {
             this.Log.LogMessage(Resources.MomcModelUpToDate, this.Model);
             return(true);
         }
         this.Log.LogMessage(Resources.CommandReturned, output);
         return(true);
     }
     else if (this.Models != null)
     {
         String output;
         foreach (ITaskItem item in this.Models)
         {
             output = Momc.Compile(item.ItemSpec, this.ToDirectory.ItemSpec);
             if (output == null)
             {
                 this.Log.LogMessage(Resources.MomcModelUpToDate, this.Model);
                 return(true);
             }
             this.Log.LogMessage(Resources.CommandReturned, output);
         }
         return(true);
     }
     else
     {
         return(true);
     }
 }
Ejemplo n.º 2
0
        protected override void ExecuteTask()
        {
            String output = Momc.Compile(this.Model.ToString(), this.ToDirectory.ToString());

            if (output == null)
            {
                this.Log(Level.Info, Resources.MomcModelUpToDate, this.Model);
                return;
            }
            this.Log(Level.Info, Resources.CommandReturned, output);
        }