Inheritance: BaseDbScriptTemplate
コード例 #1
0
    public override void Generate()
		{
			//If this is NOT a zero-touch install then there is no embedded SQL
			if (!_model.Database.AllowZeroTouch) return;
			foreach (Table table in (from x in _model.Database.Tables where x.Generated orderby x.Name select x))
			{
				if (table.Generated)
				{
					ZeroInstallSQL_DeleteTemplate template = new ZeroInstallSQL_DeleteTemplate(_model, table);
					string fullFileName = template.FileName;
					ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, PARENT_ITEM_NAME, ProjectItemType.Folder, this, true);
					eventArgs.Properties.Add("BuildAction", 3);
					OnProjectItemGenerated(this, eventArgs);
				}
			}
			ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
			OnGenerationComplete(this, gcEventArgs);
    }
コード例 #2
0
        public override void Generate()
        {
            //If this is NOT a zero-touch install then there is no embedded SQL
            if (!_model.Database.AllowZeroTouch)
            {
                return;
            }
            foreach (Table table in (from x in _model.Database.Tables where x.Generated orderby x.Name select x))
            {
                if (table.Generated)
                {
                    ZeroInstallSQL_DeleteTemplate template = new ZeroInstallSQL_DeleteTemplate(_model, table);
                    string fullFileName = template.FileName;
                    ProjectItemGeneratedEventArgs eventArgs = new ProjectItemGeneratedEventArgs(fullFileName, template.FileContent, ProjectName, PARENT_ITEM_NAME, ProjectItemType.Folder, this, true);
                    eventArgs.Properties.Add("BuildAction", 3);
                    OnProjectItemGenerated(this, eventArgs);
                }
            }
            ProjectItemGenerationCompleteEventArgs gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);

            OnGenerationComplete(this, gcEventArgs);
        }