Execute() public method

public Execute ( ) : void
return void
Beispiel #1
0
        public void AddNewTemplateEditor(RazorTemplateViewModel template, bool current = true)
        {
            Log.Debug("Adding new template editor (current: {0})...", current);

            template.AutoExecute = AutoExecute;
            template.AutoSave    = AutoExecute;
            template.Messages    = Messages;

            template.Executing += OnAutoSave;

            Templates.Add(template);

            if (!string.IsNullOrWhiteSpace(template.Filename))
            {
                RecentFiles.Add(template.Filename);
            }

            if (current)
            {
                Log.Debug("Setting as current template");
                CurrentTemplate = template;
            }

            template.Execute();

            Log.Info("Added new template editor");
        }
Beispiel #2
0
        public void AddNewTemplateEditor(RazorTemplateViewModel template, bool current = true)
        {
            Log.Debug("Adding new template editor (current: {0})...", current);

            template.AutoExecute = AutoExecute;
            template.AutoSave = AutoExecute;
            template.Messages = Messages;

            template.Executing += OnAutoSave;

            Templates.Add(template);

            if (!string.IsNullOrWhiteSpace(template.Filename))
                RecentFiles.Add(template.Filename);

            if (current)
            {
                Log.Debug("Setting as current template");
                CurrentTemplate = template;
            }

            template.Execute();

            Log.Info("Added new template editor");
        }