From fb91eb8a003de9321b8c973811ce33e7cbdd2143 Mon Sep 17 00:00:00 2001 From: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com> Date: Mon, 17 Feb 2020 16:32:07 -0800 Subject: [PATCH 1/2] Added PackageId --- src/BlazorFileSaver/BlazorFileSaver.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BlazorFileSaver/BlazorFileSaver.csproj b/src/BlazorFileSaver/BlazorFileSaver.csproj index 16c2c30..308fd80 100644 --- a/src/BlazorFileSaver/BlazorFileSaver.csproj +++ b/src/BlazorFileSaver/BlazorFileSaver.csproj @@ -5,9 +5,10 @@ 3.0 true BlazorFileSaver + BlazorFileSaver Blazor Component wrapper for FileSaver.js Ivan Josipovic - https://blazorfilesaver.netlify.com/ + https://blazorfilesaver.netlify.com Blazor;File;Save;FileSave;FileSaver icon.png https://github.com/IvanJosipovic/BlazorFileSaver From ac9ab1ba1d3a85bf4246598670665b453a78cef1 Mon Sep 17 00:00:00 2001 From: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com> Date: Mon, 17 Feb 2020 16:41:27 -0800 Subject: [PATCH 2/2] Updated to .Net 3.1.1 Updated Sample to 3.2.0-preview1.20073.1 --- .github/workflows/cicd.yml | 2 +- .github/workflows/release.yml | 2 +- README.md | 21 ++++++++++--------- .../BlazorFileSaver.Sample.csproj | 6 +++--- src/BlazorFileSaver.Sample/Program.cs | 15 +++++++------ src/BlazorFileSaver.Sample/Startup.cs | 18 ---------------- src/BlazorFileSaver/BlazorFileSaver.csproj | 4 ++-- 7 files changed, 27 insertions(+), 41 deletions(-) delete mode 100644 src/BlazorFileSaver.Sample/Startup.cs diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 9d46ca6..2c1e611 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.100 + dotnet-version: 3.1.101 - name: Publish working-directory: src/BlazorFileSaver.Sample diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9ea7b3..61e2dd2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.100 + dotnet-version: 3.1.101 - name: Dotnet Pack working-directory: src/BlazorFileSaver diff --git a/README.md b/README.md index 1454cee..becfb2b 100644 --- a/README.md +++ b/README.md @@ -13,25 +13,26 @@ Blazor Component wrapper for [FileSaver.js](https://github.com/eligrey/FileSaver # Installation -- Add Nuget BlazorFileSaver +- Add Nuget [BlazorFileSaver](https://www.nuget.org/packages/BlazorTable) - Add ```` to the index.html or _Hosts.cshtml -- Add AddBlazorFileSaver() to the ConfigureServices in Startup.cs as noted below +- Add AddBlazorFileSaver() to the ConfigureServices in Program.cs as noted below -# Startup.cs +# Program.cs ```csharp namespace BlazorFileSaver.Sample { - public class Startup + public class Program { - public void ConfigureServices(IServiceCollection services) + public static async Task Main(string[] args) { - services.AddBlazorFileSaver(); // Add This! - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); + + builder.RootComponents.Add("app"); - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent("app"); + builder.Services.AddBlazorFileSaver(); // Add This! + + await builder.Build().RunAsync(); } } } diff --git a/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj b/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj index a0d2480..4164b61 100644 --- a/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj +++ b/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/src/BlazorFileSaver.Sample/Program.cs b/src/BlazorFileSaver.Sample/Program.cs index 8b207e2..1b659a6 100644 --- a/src/BlazorFileSaver.Sample/Program.cs +++ b/src/BlazorFileSaver.Sample/Program.cs @@ -1,16 +1,19 @@ using Microsoft.AspNetCore.Blazor.Hosting; +using System.Threading.Tasks; namespace BlazorFileSaver.Sample { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); + + builder.RootComponents.Add("app"); + + builder.Services.AddBlazorFileSaver(); - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup(); + await builder.Build().RunAsync(); + } } } diff --git a/src/BlazorFileSaver.Sample/Startup.cs b/src/BlazorFileSaver.Sample/Startup.cs deleted file mode 100644 index 771ff82..0000000 --- a/src/BlazorFileSaver.Sample/Startup.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace BlazorFileSaver.Sample -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - services.AddBlazorFileSaver(); - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent("app"); - } - } -} diff --git a/src/BlazorFileSaver/BlazorFileSaver.csproj b/src/BlazorFileSaver/BlazorFileSaver.csproj index 308fd80..647a6b8 100644 --- a/src/BlazorFileSaver/BlazorFileSaver.csproj +++ b/src/BlazorFileSaver/BlazorFileSaver.csproj @@ -21,8 +21,8 @@ - - + +