Exemplo n.º 1
0
 ///--------------------------------------------------------------------------------
 /// <summary>Interpret this node to produce code, output, or model data..</summary>
 ///
 /// <param name="interpreterType">The type of interpretation to perform.</param>
 /// <param name="solutionContext">The associated solution.</param>
 /// <param name="templateContext">The associated template.</param>
 /// <param name="modelContext">The associated model context.</param>
 ///--------------------------------------------------------------------------------
 public void InterpretNode(InterpreterTypeCode interpreterType, Solution solutionContext, ITemplate templateContext, IDomainEnterpriseObject modelContext)
 {
     try
     {
         string parameterValue = String.Empty;
         if (Text != null)
         {
             parameterValue = Text.GetStringValue(solutionContext, templateContext, modelContext, interpreterType);
         }
         string message = ShowDebugMessage(solutionContext, templateContext, modelContext, parameterValue, false);
         if (FilePath != null)
         {
             string path = FilePath.GetStringValue(solutionContext, templateContext, modelContext, interpreterType);
             FileHelper.AppendToFile(path, message);
         }
         MessageBox.Show(message, DisplayValues.Debug_Caption);
     }
     catch (ApplicationAbortException)
     {
         throw;
     }
     catch (System.Exception ex)
     {
         LogException(solutionContext, templateContext, modelContext, ex, interpreterType);
     }
 }
Exemplo n.º 2
0
 ///--------------------------------------------------------------------------------
 /// <summary>This method saves the data for this entity as an xml file.</summary>
 ///
 /// <param name="inputFilePath">The path of the file to save to.</param>
 ///--------------------------------------------------------------------------------
 public virtual void Save(string inputFilePath)
 {
     FileHelper.AppendToFile(inputFilePath, XmlHelper.Serialize(this));
 }