protected override void OnValidationEnded(ValidationContext context)
 {
     if (context != null)
     {
         if (context.Categories == ValidationCategories.Menu &&
             context.CurrentViolations.Count == 0)
         {
             Logger.Write(
                 string.Format(CultureInfo.CurrentCulture, Properties.Resources.ValidationEndedMessage,
                               Logger.Messages[TraceEventType.Error],
                               Logger.Messages[TraceEventType.Warning],
                               Logger.Messages[TraceEventType.Information]),
                 TraceEventType.Information);
         }
         Logger.ResumeRefresh();
         ValidationEngine.Reset();
     }
     status.Clear();
 }
Ejemplo n.º 2
0
 private void GenerateArtifacts(IArtifactLinkContainer links)
 {
     if (links != null)
     {
         if (links != null &&
             links.ArtifactLinks != null)
         {
             VSStatusBar status = new VSStatusBar(this.ServiceProvider);
             try
             {
                 ICodeGenerationService codeGenerationService = this.ServiceProvider.GetService(typeof(ICodeGenerationService)) as ICodeGenerationService;
                 int generatedObjects = codeGenerationService.GenerateArtifacts(links.ArtifactLinks,
                                                                                l => { status.ShowMessage(l.ItemPath); });
                 Logger.Write(
                     string.Format(CultureInfo.CurrentCulture, Properties.Resources.GeneratedObjects, generatedObjects),
                     System.Diagnostics.TraceEventType.Information);
             }
             finally
             {
                 status.Clear();
             }
         }
     }
 }