public override void Generate() { var template = new CreateDataTemplate(_model); var fullFileName = template.FileName; var eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, PARENT_ITEM_NAME, ProjectItemType.Folder, this, true); eventArgs.Properties.Add("BuildAction", 3); OnProjectItemGenerated(this, eventArgs); var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this); OnGenerationComplete(this, gcEventArgs); }
public override void Generate() { var template = new CreateDataTemplate(_model); var fullFileName = template.FileName; var eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, PARENT_ITEM_NAME, ProjectItemType.Folder, this, true); eventArgs.Properties.Add("BuildAction", 3); OnProjectItemGenerated(this, eventArgs); var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this); OnGenerationComplete(this, gcEventArgs); //Delete the old one var delEventArgs = new ProjectItemDeletedEventArgs($@"{Path.DirectorySeparatorChar}{PARENT_ITEM_NAME}{Path.DirectorySeparatorChar}{template.OldFileName}", ProjectName, this); delEventArgs.DeleteFile = true; OnProjectItemDeleted(this, delEventArgs); }