Exemple #1
0
 public override void Generate()
 {
     try
     {
         foreach (CustomView view in _model.Database.CustomViews)
         {
             if (view.Generated)
             {
                 BusinessViewCollectionExtenderTemplate template = new BusinessViewCollectionExtenderTemplate(_model, view);
                 string fullFileName = RELATIVE_OUTPUT_LOCATION + template.FileName;
                 ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, this, false);
                 OnProjectItemGenerated(this, eventArgs);
             }
         }
         ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
         OnGenerationComplete(this, gcEventArgs);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
    public override void Generate()
		{
      try
      {
        foreach(CustomView view in _model.Database.CustomViews)
        {
          if(view.Generated)
          {
            BusinessViewCollectionExtenderTemplate template = new BusinessViewCollectionExtenderTemplate(_model, view);
            string fullFileName = RELATIVE_OUTPUT_LOCATION + template.FileName;
            ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, this, false);
            OnProjectItemGenerated(this, eventArgs);
          }
        }
        ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
        OnGenerationComplete(this, gcEventArgs);
      }
      catch(Exception ex)
      {
        throw;
      }
		}