Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RecommendationTools/UnitTests/S3SyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ public async Task ValidateS3RecommendationContentMatchesRepository()
ZipFile.ExtractToDirectory("github.zip", TempExtractDir);
var pathToRepoRecs = $@"{TempExtractDir}\porting-assistant-dotnet-datastore-master\recommendation";
var pathToRepoTemplates = $@"{TempExtractDir}\porting-assistant-dotnet-datastore-master\Templates";
var pathToTagConfigs = $@"{TempExtractDir}\porting-assistant-dotnet-datastore-master\tagconfigs";

var allRepoFilesToCheck = Directory.EnumerateFiles(pathToRepoRecs, "*", SearchOption.AllDirectories).ToList();
var allRepoTemplates = Directory.EnumerateFiles(pathToRepoTemplates, "*", SearchOption.AllDirectories).ToList();
var allRepoConfigs = Directory.EnumerateFiles(pathToTagConfigs, "*", SearchOption.AllDirectories).ToList();

allRepoFilesToCheck.AddRange(allRepoTemplates);
allRepoFilesToCheck.AddRange(allRepoConfigs);

Assert.Multiple(async () =>
{
Expand Down
10 changes: 10 additions & 0 deletions Templates/webforms/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
18 changes: 18 additions & 0 deletions recommendation/project.all.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
"Type": "ProjectFile",
"Value": "",
"Description": "Migrate csproj file to core"
},
{
"Name": "WebFormsPorting",
"Type": "ProjectType",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is ProjectType a new action type we're adding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I added a new action type called project type. I figured WCF and any other stuff that would otherwise be used with a project rewriter could be put under this action type

"Value": "",
"Description": "Perform WebForms specific porting steps"
}
]
},
Expand Down Expand Up @@ -124,6 +130,12 @@
"Type": "ProjectFile",
"Value": "",
"Description": "Migrate csproj file to core."
},
{
"Name": "WebFormsPorting",
"Type": "ProjectType",
"Value": "",
"Description": "Perform WebForms specific porting steps"
}
]
},
Expand Down Expand Up @@ -166,6 +178,12 @@
"Type": "ProjectFile",
"Value": "",
"Description": "Migrate csproj file to core."
},
{
"Name": "WebFormsPorting",
"Type": "ProjectType",
"Value": "",
"Description": "Perform WebForms specific porting steps"
}
]
}
Expand Down
16 changes: 16 additions & 0 deletions tagconfigs/asp.BoundField.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!Template
TagName: asp:BoundField

Invocations:
- !AddUsingDirective
NamespaceName: BlazorWebFormsComponents

Templates:
Default: |
<BoundField
DataField=#DataField#
DataFormatString=#DataFormatString#
HeaderText=#HeaderText#
Visible=#Visible:ComponentBoolean#>
#InnerHtml#
</BoundField>
14 changes: 14 additions & 0 deletions tagconfigs/asp.Button.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
!Template
TagName: asp:Button
CodeBehindType: System.Web.UI.WebControls.Button
CodeBehindHandler: Default

Templates:
Default: |
<button
id=#ID#
class=#CssClass#
@onclick=#OnClick:Click:EventHandler#
disabled=#Enabled:InvertedHtmlBoolean#>
#Text#
</button>
19 changes: 19 additions & 0 deletions tagconfigs/asp.ButtonField.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
!Template
TagName: asp:ButtonField

Invocations:
- !AddUsingDirective
NamespaceName: BlazorWebFormsComponents

Templates:
Default: |
<ButtonField
ButtonType=#ButtonType#
CommandName=#CommandName#
DataTextField=#DataTextField#
DataTextFormatString=#DataTextFormatString#
ImageUrl=#ImageUrl#
HeaderText=#HeaderText#
Visible=#Visible:ComponentBoolean#>
#InnerHtml#
</ButtonField>
4 changes: 4 additions & 0 deletions tagconfigs/asp.Content.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!Template
TagName: asp:Content
Templates:
Default: "#InnerHtml#"
4 changes: 4 additions & 0 deletions tagconfigs/asp.ContentPlaceHolder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!Template
TagName: asp:ContentPlaceHolder
Templates:
Default: "@Body"
33 changes: 33 additions & 0 deletions tagconfigs/asp.GridView.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
!Template
TagName: asp:GridView
CodeBehindType: System.Web.UI.WebControls.GridView
CodeBehindHandler: Default

Invocations:
- !AddUsingDirective
NamespaceName: BlazorWebFormsComponents

Templates:
Default: |
<GridView
ID=#ID#
AutoGenerateColumns=#AutoGenerateColumns:ComponentBoolean#
CssClass=#CssClass#
DataKeyNames=#DataKeyNames#
DataSource=#DataSource#
EmptyDataText=#EmptyDataText#
Enabled=#Enabled:ComponentBoolean#
Items=#Items#
ItemType=#ItemType#
OnDataBinding=#OnDataBinding:DataBinding:EventHandler#
OnDataBound=#OnDataBound:DataBound:EventHandler#
OnItemDataBound=#OnRowDataBound:RowDataBound:EventHandler#
OnInit=#OnInit:Init:EventHandler#
OnLoad=#OnLoad:Load:EventHandler#
OnPreRender=#OnPreRender:PreRender:EventHandler#
OnUnload=#OnUnload:Unload:EventHandler#
OnDisposed=#OnDisposed:Disposed:EventHandler#
TabIndex=#TabIndex#
Visible=#Visible#>
#InnerHtml#
</GridView>
14 changes: 14 additions & 0 deletions tagconfigs/asp.HyperLink.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
!Template
TagName: asp:HyperLink
CodeBehindType: System.Web.UI.WebControls.HyperLink
CodeBehindHandler: Default

Templates:
Default: |
<a
id=#ID#
class=#CssClass#
href=#NavigateUrl#>
#Text#
#InnerHtml#
</a>
22 changes: 22 additions & 0 deletions tagconfigs/asp.HyperLinkField.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
!Template
TagName: asp:HyperLinkField

Invocations:
- !AddUsingDirective
NamespaceName: BlazorWebFormsComponents

Templates:
Default: |
<HyperLinkField
AccessibleHeaderText=#AccessibleHeaderText#
DataTextField=#DataTextField#
DataTextFormatString=#DataTextFormatString#
DataNavigateUrlFields=#DataNavigateUrlFields#
DataNavigateUrlFormatString=#DataNavigateUrlFormatString#
HeaderText=#HeaderText#
NavigateUrl=#NavigateUrl#
Text=#Text#
Target=#Target#
Visible=#Visible:ComponentBoolean#>
#InnerHtml#
</HyperLinkField>
13 changes: 13 additions & 0 deletions tagconfigs/asp.Label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
!Template
TagName: asp:Label
CodeBehindType: System.Web.UI.WebControls.Label
CodeBehindHandler: Default

Templates:
Default: |
<label
id=#ID#
class=#CssClass#>
#Text#
#InnerHtml#
</label>
50 changes: 50 additions & 0 deletions tagconfigs/asp.ListView.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
!Template
TagName: asp:ListView
CodeBehindType: System.Web.UI.WebControls.ListView
CodeBehindHandler: Default

Invocations:
- !AddUsingDirective
NamespaceName: BlazorWebFormsComponents

Templates:
Default: |
<ListView
ID=#ID#
ItemType=#ItemType#
AdditionalAttributes=#AdditionalAttributes#
AlternatingItemTemplate=#AlternatingItemTemplate#
ChildComponents=#ChildComponents#
ChildContent=#ChildContent#
DataKeys=#DataKeys#
DataMember=#DataMember#
DataSource=#DataSource#
DataSourceID=#DataSourceID#
EmptyDataTemplate=#EmptyDataTemplate#
Enabled=#Enabled:ComponentBoolean#
EnableTheming=#EnableTheming:ComponentBoolean#
EnableViewState=#EnableViewState:ComponentBoolean#
GroupItemCount=#GroupItemCount#
GroupSeparatorTemplate=#GroupSeparatorTemplate#
GroupTemplate=#GroupTemplate#
InsertItemPosition=#InsertItemPosition#
ItemPlaceholderID=#ItemPlaceholderID#
Items=#Items#
ItemSeparatorTemplate=#ItemSeparatorTemplate#
ItemTemplate=#ItemTemplate#
LayoutTemplate=#LayoutTemplate#
OnDataBinding=#OnDataBinding:DataBinding:EventHandler#
OnDataBound=#OnDataBound:DataBound:EventHandler#
OnDisposed=#OnDisposed:Disposed:EventHandler#
OnInit=#OnInit:Init:EventHandler#
OnItemDataBound=#OnItemDataBound:ItemDataBound:EventHandler#
OnLayoutCreated=#OnLayoutCreated:LayoutCreated:EventHandler#
OnLoad=#OnLoad:Load:EventHandler#
OnPreRender=#OnPreRender:PreRender:EventHandler#
OnUnload=#OnUnload:Unload:EventHandler#
SelectedIndex=#SelectedIndex#
Style=#Style#
TabIndex=#TabIndex#
Visible=#Visible:ComponentBoolean#>
#InnerHtml#
</ListView>
4 changes: 4 additions & 0 deletions tagconfigs/asp.PlaceHolder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!Template
TagName: asp:PlaceHolder
Templates:
Default: "@#ID#"
30 changes: 30 additions & 0 deletions tagconfigs/asp.RadioButton.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
!Template
TagName: asp:RadioButton
CodeBehindType: System.Web.UI.WebControls.RadioButton
CodeBehindHandler: Default

Conditions:
- !HasAttribute
AttributeName: Text
ForTemplates: [WithLabel]

Templates:
WithLabel: |
<input
id=#ID#
class=#CssClass#
type="radio"
name=#GroupName#
checked=#Checked:HtmlBoolean#
disabled=#Enabled:InvertedHtmlBoolean#/>
<label for=#ID#>
#Text#
</label>
WithoutLabel: |
<input
id=#ID#
class=#CssClass#
type="radio"
name=#GroupName#
checked=#Checked:HtmlBoolean#
disabled=#Enabled:InvertedHtmlBoolean#/>
15 changes: 15 additions & 0 deletions tagconfigs/asp.TemplateField.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
!Template
TagName: asp:TemplateField

Invocations:
- !AddUsingDirective
NamespaceName: BlazorWebFormsComponents

Templates:
Default: |
<TemplateField
ItemTemplate=#ItemTemplate#
HeaderText=#HeaderText#
Visible=#Visible:ComponentBoolean#>
#InnerHtml#
</TemplateField>
48 changes: 48 additions & 0 deletions tagconfigs/asp.TextBox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
!Template
TagName: asp:TextBox
CodeBehindType: System.Web.UI.WebControls.TextBox
CodeBehindHandler: Default

Conditions:
- !HasAttributeWithValue
AttributeName: TextMode
AttributeValue: MultiLine
ForTemplates: [TextArea]
- !HasAttributeWithValue
AttributeName: TextMode
AttributeValue: Password
ForTemplates: [Password]

Templates:
TextArea: |
<textarea
id=#ID#
class=#CssClass#
maxlength=#MaxLength#
rows=#Rows#
cols=#Columns#
@onchange=#OnTextChanged:TextChanged:EventHandler#
readonly=#ReadOnly:HtmlBoolean#
disabled=#Enabled:InvertedHtmlBoolean#>
#Text#
</textarea>
Password: |
<input
id=#ID#
class=#CssClass#
value=#Text#
maxlength=#MaxLength#
type="password"
@onchange=#OnTextChanged:TextChanged:EventHandler#
readonly=#ReadOnly:HtmlBoolean#
disabled=#Enabled:InvertedHtmlBoolean#>
Default: |
<input
id=#ID#
class=#CssClass#
value=#Text#
maxlength=#MaxLength#
type="text"
@onchange=#OnTextChanged:TextChanged:EventHandler#
readonly=#ReadOnly:HtmlBoolean#
disabled=#Enabled:InvertedHtmlBoolean#>
4 changes: 4 additions & 0 deletions tagconfigs/body.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!Template
TagName: body
Templates:
Default: "#InnerHtml#"
7 changes: 7 additions & 0 deletions tagconfigs/head.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
!Template
TagName: "head"
Templates:
Default: |
@*<head>
#InnerHtml#
</head>*@
4 changes: 4 additions & 0 deletions tagconfigs/html.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!Template
TagName: html
Templates:
Default: "#InnerHtml#"