Skip to content

Commit

Permalink
Adding nuget packages for very common use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Freeman committed Oct 20, 2022
1 parent 6e90970 commit 9ea1ad7
Show file tree
Hide file tree
Showing 23 changed files with 287 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions Blazor.Text.Editor.Analysis.CSharp.ClassLib/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Blazor.Text.Editor.Analysis.CSharp.ClassLib;

public class Class1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions Blazor.Text.Editor.Analysis.CSharp.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Blazor.Text.Editor.Analysis.CSharp.Tests;

public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
1 change: 1 addition & 0 deletions Blazor.Text.Editor.Analysis.CSharp.Tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions Blazor.Text.Editor.Analysis.Html.ClassLib/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Blazor.Text.Editor.Analysis.Html.ClassLib;

public class Class1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions Blazor.Text.Editor.Analysis.Html.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Blazor.Text.Editor.Analysis.Html.Tests;

public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
1 change: 1 addition & 0 deletions Blazor.Text.Editor.Analysis.Html.Tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions Blazor.Text.Editor.Analysis.JavaScript.ClassLib/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Blazor.Text.Editor.Analysis.JavaScript.ClassLib;

public class Class1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions Blazor.Text.Editor.Analysis.JavaScript.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Blazor.Text.Editor.Analysis.JavaScript.Tests;

public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
1 change: 1 addition & 0 deletions Blazor.Text.Editor.Analysis.JavaScript.Tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions Blazor.Text.Editor.Analysis.TypeScript.ClassLib/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace Blazor.Text.Editor.Analysis.TypeScript.ClassLib;

public class Class1
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions Blazor.Text.Editor.Analysis.TypeScript.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Blazor.Text.Editor.Analysis.TypeScript.Tests;

public class UnitTest1
{
[Fact]
public void Test1()
{
}
}
1 change: 1 addition & 0 deletions Blazor.Text.Editor.Analysis.TypeScript.Tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
30 changes: 15 additions & 15 deletions BlazorStudio.RazorLib/Editor/EditorDisplay.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

// Example usage:
// --------------
var content = await FileSystemProvider.ReadFileAsync(_absoluteFilePath);

var textEditor = new TextEditorBase(
content,
new TextEditorCSharpLexer(),
new TextEditorCSharpDecorationMapper(),
_testTextEditorKey);

await textEditor.ApplySyntaxHighlightingAsync();

TextEditorService
.RegisterTextEditor(textEditor);

Dispatcher.Dispatch(
new SetActiveTextEditorKeyAction(_testTextEditorKey));
// var content = await FileSystemProvider.ReadFileAsync(_absoluteFilePath);
//
// var textEditor = new TextEditorBase(
// content,
// new TextEditorCSharpLexer(),
// new TextEditorCSharpDecorationMapper(),
// _testTextEditorKey);
//
// await textEditor.ApplySyntaxHighlightingAsync();
//
// TextEditorService
// .RegisterTextEditor(textEditor);
//
// Dispatcher.Dispatch(
// new SetActiveTextEditorKeyAction(_testTextEditorKey));
}

await base.OnAfterRenderAsync(firstRender);
Expand Down
79 changes: 79 additions & 0 deletions BlazorStudio.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,36 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Blazor.Text.Editor", "Blazo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorTextEditor.RazorLib", "..\Blazor.Text.Editor\BlazorTextEditor.RazorLib\BlazorTextEditor.RazorLib.csproj", "{649E436D-6A3E-4325-968B-EEE934AB0084}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.CSharp.ClassLib", "Blazor.Text.Editor.Analysis.CSharp.ClassLib\Blazor.Text.Editor.Analysis.CSharp.ClassLib.csproj", "{0C318474-AF62-4B7C-B34C-DC9AC6074468}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{597C6845-884C-4022-8C05-343AA8D0ED05}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CSharp", "CSharp", "{5B737759-0C88-4764-AD32-1505BA050B1E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.CSharp.Tests", "Blazor.Text.Editor.Analysis.CSharp.Tests\Blazor.Text.Editor.Analysis.CSharp.Tests.csproj", "{EC869DF0-0A04-4249-AAC4-64665A741D53}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScript", "JavaScript", "{05CB39B6-1894-48C5-891C-5880AA20C463}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.JavaScript.Tests", "Blazor.Text.Editor.Analysis.JavaScript.Tests\Blazor.Text.Editor.Analysis.JavaScript.Tests.csproj", "{2B9D2198-FB42-436D-8D7C-64513CCB3DCF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.JavaScript.ClassLib", "Blazor.Text.Editor.Analysis.JavaScript.ClassLib\Blazor.Text.Editor.Analysis.JavaScript.ClassLib.csproj", "{FD64C572-E3E3-4C00-B521-A00F4889527A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TypeScript", "TypeScript", "{E2DD98E3-75C3-4C85-BEF6-0102AAF2AFFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.TypeScript.ClassLib", "Blazor.Text.Editor.Analysis.TypeScript.ClassLib\Blazor.Text.Editor.Analysis.TypeScript.ClassLib.csproj", "{B33AF183-4F58-4526-9877-EDF9000B5A75}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.TypeScript.Tests", "Blazor.Text.Editor.Analysis.TypeScript.Tests\Blazor.Text.Editor.Analysis.TypeScript.Tests.csproj", "{89E9F814-2DBF-40AB-91A0-2285E3A8B2B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Html", "Html", "{43633EF9-8DB0-4ECC-84DB-AC767770CD8D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.Html.Tests", "Blazor.Text.Editor.Analysis.Html.Tests\Blazor.Text.Editor.Analysis.Html.Tests.csproj", "{B8F8CEFB-15DA-43CE-80E1-E4EAE696C10D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.Text.Editor.Analysis.Html.ClassLib", "Blazor.Text.Editor.Analysis.Html.ClassLib\Blazor.Text.Editor.Analysis.Html.ClassLib.csproj", "{D0CACF71-CF3B-4CC7-933F-1908F123CD28}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BlazorStudio", "BlazorStudio", "{F9E1080F-281E-4776-BEB0-9DD3165B6B2A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Photino", "Photino", "{F03546A9-628B-4485-8293-04CD90F32D66}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -61,6 +91,38 @@ Global
{649E436D-6A3E-4325-968B-EEE934AB0084}.Debug|Any CPU.Build.0 = Debug|Any CPU
{649E436D-6A3E-4325-968B-EEE934AB0084}.Release|Any CPU.ActiveCfg = Release|Any CPU
{649E436D-6A3E-4325-968B-EEE934AB0084}.Release|Any CPU.Build.0 = Release|Any CPU
{0C318474-AF62-4B7C-B34C-DC9AC6074468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C318474-AF62-4B7C-B34C-DC9AC6074468}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C318474-AF62-4B7C-B34C-DC9AC6074468}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C318474-AF62-4B7C-B34C-DC9AC6074468}.Release|Any CPU.Build.0 = Release|Any CPU
{EC869DF0-0A04-4249-AAC4-64665A741D53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC869DF0-0A04-4249-AAC4-64665A741D53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC869DF0-0A04-4249-AAC4-64665A741D53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC869DF0-0A04-4249-AAC4-64665A741D53}.Release|Any CPU.Build.0 = Release|Any CPU
{2B9D2198-FB42-436D-8D7C-64513CCB3DCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B9D2198-FB42-436D-8D7C-64513CCB3DCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B9D2198-FB42-436D-8D7C-64513CCB3DCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B9D2198-FB42-436D-8D7C-64513CCB3DCF}.Release|Any CPU.Build.0 = Release|Any CPU
{FD64C572-E3E3-4C00-B521-A00F4889527A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD64C572-E3E3-4C00-B521-A00F4889527A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD64C572-E3E3-4C00-B521-A00F4889527A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD64C572-E3E3-4C00-B521-A00F4889527A}.Release|Any CPU.Build.0 = Release|Any CPU
{B33AF183-4F58-4526-9877-EDF9000B5A75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B33AF183-4F58-4526-9877-EDF9000B5A75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B33AF183-4F58-4526-9877-EDF9000B5A75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B33AF183-4F58-4526-9877-EDF9000B5A75}.Release|Any CPU.Build.0 = Release|Any CPU
{89E9F814-2DBF-40AB-91A0-2285E3A8B2B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89E9F814-2DBF-40AB-91A0-2285E3A8B2B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89E9F814-2DBF-40AB-91A0-2285E3A8B2B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89E9F814-2DBF-40AB-91A0-2285E3A8B2B6}.Release|Any CPU.Build.0 = Release|Any CPU
{B8F8CEFB-15DA-43CE-80E1-E4EAE696C10D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8F8CEFB-15DA-43CE-80E1-E4EAE696C10D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8F8CEFB-15DA-43CE-80E1-E4EAE696C10D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8F8CEFB-15DA-43CE-80E1-E4EAE696C10D}.Release|Any CPU.Build.0 = Release|Any CPU
{D0CACF71-CF3B-4CC7-933F-1908F123CD28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0CACF71-CF3B-4CC7-933F-1908F123CD28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0CACF71-CF3B-4CC7-933F-1908F123CD28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0CACF71-CF3B-4CC7-933F-1908F123CD28}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -69,6 +131,23 @@ Global
{3F915C2F-8B4D-4C25-B29D-E608BEC3DE8B} = {9E885BE5-B6D9-4CB4-A4AC-764EA2BFA9E4}
{D5A0214B-3787-40AA-A4E5-1EEA300C87EE} = {9E885BE5-B6D9-4CB4-A4AC-764EA2BFA9E4}
{649E436D-6A3E-4325-968B-EEE934AB0084} = {5529CBBF-C41F-4F70-9415-35E1740F328E}
{5B737759-0C88-4764-AD32-1505BA050B1E} = {597C6845-884C-4022-8C05-343AA8D0ED05}
{0C318474-AF62-4B7C-B34C-DC9AC6074468} = {5B737759-0C88-4764-AD32-1505BA050B1E}
{EC869DF0-0A04-4249-AAC4-64665A741D53} = {5B737759-0C88-4764-AD32-1505BA050B1E}
{05CB39B6-1894-48C5-891C-5880AA20C463} = {597C6845-884C-4022-8C05-343AA8D0ED05}
{2B9D2198-FB42-436D-8D7C-64513CCB3DCF} = {05CB39B6-1894-48C5-891C-5880AA20C463}
{FD64C572-E3E3-4C00-B521-A00F4889527A} = {05CB39B6-1894-48C5-891C-5880AA20C463}
{E2DD98E3-75C3-4C85-BEF6-0102AAF2AFFA} = {597C6845-884C-4022-8C05-343AA8D0ED05}
{B33AF183-4F58-4526-9877-EDF9000B5A75} = {E2DD98E3-75C3-4C85-BEF6-0102AAF2AFFA}
{89E9F814-2DBF-40AB-91A0-2285E3A8B2B6} = {E2DD98E3-75C3-4C85-BEF6-0102AAF2AFFA}
{43633EF9-8DB0-4ECC-84DB-AC767770CD8D} = {597C6845-884C-4022-8C05-343AA8D0ED05}
{B8F8CEFB-15DA-43CE-80E1-E4EAE696C10D} = {43633EF9-8DB0-4ECC-84DB-AC767770CD8D}
{D0CACF71-CF3B-4CC7-933F-1908F123CD28} = {43633EF9-8DB0-4ECC-84DB-AC767770CD8D}
{4CA31C1C-0A96-4E65-A2A8-4BB549C25F70} = {F9E1080F-281E-4776-BEB0-9DD3165B6B2A}
{909A6247-351E-47A1-928A-B46D0AB01B14} = {F9E1080F-281E-4776-BEB0-9DD3165B6B2A}
{1C9FBAEC-12DE-488A-9A8F-2DC5377FC9E8} = {F9E1080F-281E-4776-BEB0-9DD3165B6B2A}
{94EB1E96-1529-4B1F-86C9-7C85EA59C59A} = {F9E1080F-281E-4776-BEB0-9DD3165B6B2A}
{84896F88-B2AB-4633-861E-B4F1B5299D80} = {F03546A9-628B-4485-8293-04CD90F32D66}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CF5C7044-00A3-49F9-8ACD-E80E6B3A3B99}
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sdk": {
"version": "6.0.0",
"rollForward": "latestMajor",
"allowPrerelease": true
"allowPrerelease": false
}
}

0 comments on commit 9ea1ad7

Please sign in to comment.