Merge pull request #49 from alexwolfmsft/fix-snippet

snippet
pull/51/head
alexwolfmsft 2022-09-16 09:14:55 -04:00 committed by GitHub
commit 21bcaf4e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -1,8 +1,7 @@
// <snippet_AddNamespaces>
// <snippet_ProgramConfigurations>
using Azure.Identity;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Azure;
// </snippet_AddNamespaces>
var builder = WebApplication.CreateBuilder(args);
var BlobStorageUri = builder.Configuration["AzureURIs:BlobStorage"];
@ -12,7 +11,6 @@ builder.Services.AddRazorPages();
builder.Services.AddHttpClient();
builder.Services.AddServerSideBlazor();
// <snippet_ConfigureServices>
builder.Services.AddAzureClientsCore();
builder.Services.AddDataProtection()
@ -20,7 +18,6 @@ builder.Services.AddDataProtection()
new DefaultAzureCredential())
.ProtectKeysWithAzureKeyVault(new Uri(KeyVaultURI),
new DefaultAzureCredential());
// </snippet_ConfigureServices>
var app = builder.Build();
if (!app.Environment.IsDevelopment())
@ -39,3 +36,4 @@ app.UseAuthorization();
app.MapRazorPages();
app.Run();
// </snippet_ProgramConfigurations>