Skip to content

Commit 03dc01a

Browse files
committed
Updates and fixes for a pretty major Stack Overflow/recursion loop issue, basic performance enhancements and a cleanup of some of the adapter logic.
1 parent cae1b2d commit 03dc01a

10 files changed

+265
-168
lines changed

guidance/MigrateWebFormCommand.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# MigrateWebForm Project Document Command File
22

33
## Overview
4+
This file, logically, is a CodeFactory [Document Command](http://docs.codefactory.software/guidance/overview-commands-intro.html) and contains all of the logic neccesary for the CodeFactory runtime to call and execute from Visual Studio. There is a single class defined called `public class MigrateWebForm : ProjectDocumentCommandBase`
45

56
## Fields
7+
The following fields are defined within this class:
8+
9+
Declaration | Notes
10+
----------- | -----------
11+
`private static readonly string commandTitle` | Used to set the title that shows up in the context-menu for the Visual Studio Solution Explorer.
12+
`private static readonly string commandDescription` | Sets a longer descriptive text for the command that shows up in several of the loaded-command windows and diagnostics screens.
613

714
## Constrcutor
15+
There is a single default constructor that is defined. This constructor should have no logic in it and is responsible for passing back its parameters to its baseclass.
16+
17+
`public MigrateWebForm(ILogger logger, IVsActions vsActions) : base(logger, vsActions, commandTitle, commandDescription)`
18+
19+
## Methods
20+
These are the following methods which are defined within this class file:
821

9-
## Methods
22+
Declaration | Notes
23+
--------- | --------
24+
`public override async Task<bool> EnableCommandAsync(VsProject result)` | Validation logic that will determine if this command should be enabled for execution.
25+
`public override async Task ExecuteCommandAsync(VsProject result)` | Code factory framework calls this method when the command has been executed. <br/> This method creates an instance of the [MigrateWebFormDialog](MigrateWebFormDialogFile.md) and displays it to the user. All migration logic is actually initialized and called from the user control.

guidance/MigrateWebFormDialogFile.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# MigrateWebForm.xaml/.xaml.xs Files
22

33
## Overview
4+
This is a wpf/xaml custom user control definition that is used to display both migration status and gather input from the developer user.
5+
46

57
## Fields
68

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# SetupBlazorProject.cs Project Command file
22

33
## Overview
4+
This file, logically, is a CodeFactory [Project Command](http://docs.codefactory.software/guidance/overview-commands-intro.html) and contains all of the logic neccesary for the CodeFactory runtime to call and execute from Visual Studio. There is a single class defined called `public class MigrateWebForm : ProjectDocumentCommandBase`
45

56
## Fields
7+
The following fields are defined within this class:
8+
9+
Declaration | Notes
10+
----------- | -----------
11+
`private static readonly string commandTitle` | Used to set the title that shows up in the context-menu for the Visual Studio Solution Explorer.
12+
`private static readonly string commandDescription` | Sets a longer descriptive text for the command that shows up in several of the loaded-command windows and diagnostics screens.
613

714
## Constrcutor
15+
There is a single default constructor that is defined. This constructor should have no logic in it and is responsible for passing back its parameters to its baseclass.
16+
17+
`public SetupBlazorProject(ILogger logger, IVsActions vsActions) : base(logger, vsActions, commandTitle, commandDescription)`
18+
19+
## Methods
20+
These are the following methods which are defined within this class file:
821

9-
## Methods
22+
Declaration | Notes
23+
--------- | --------
24+
`public override async Task<bool> EnableCommandAsync(VsProject result)` | Validation logic that will determine if this command should be enabled for execution.
25+
`public override async Task ExecuteCommandAsync(VsProject result)` | Code factory framework calls this method when the command has been executed.

src/WebFormsToBlazorServerCommands/Commands/Document/MigrateWebForm.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace WebFormsToBlazorServerCommands.Commands.Document
1818
public class MigrateWebForm : ProjectDocumentCommandBase
1919
{
2020
private static readonly string commandTitle = "Migrate to Blazor";
21-
private static readonly string commandDescription = "Replace with description of what this command does";
21+
private static readonly string commandDescription = "Migrates a single *.aspx page to a Blazor componenet.";
2222

2323
#pragma warning disable CS1998
2424

@@ -62,7 +62,7 @@ public override async Task ExecuteCommandAsync(VsDocument result)
6262
{
6363
try
6464
{
65-
//User Control to see the AngleSharp Nodes
65+
//User Control
6666
var migrateDialog = await VisualStudioActions.UserInterfaceActions.CreateVsUserControlAsync<MigrateWebFormDialog>();
6767

6868
//Get Project List

0 commit comments

Comments
 (0)