This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Package Microsoft.Azure.AppConfiguration.AspNetCore -Version 3.0.0-preview-011100002-1192 | |
Install-Package Azure.Identity -Version 1.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure.Identity; | |
namespace MusicStore.Web | |
{ | |
public class Program | |
{ | |
... | |
public static IHostBuilder CreateHostBuilder(string[] args) => | |
Host.CreateDefaultBuilder(args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MusicStore.Web | |
{ | |
public class Program | |
{ | |
... | |
public static IHostBuilder CreateHostBuilder(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => { | |
webBuilder.UseStartup<Startup>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MusicStore.Web | |
{ | |
public class Program | |
{ | |
... | |
public static IHostBuilder CreateHostBuilder(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => { | |
webBuilder.UseStartup<Startup>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MusicStore.Web | |
{ | |
public class Startup | |
{ | |
... | |
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
app.UseAzureAppConfiguration(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Hosting; | |
namespace MusicStore.Web | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MusicStore.Web | |
{ | |
public class Startup | |
{ | |
... | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
... | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model DisabledFeatureViewModel | |
@{ | |
ViewData["Title"] = "Feature Disabled"; | |
} | |
<div class="text-center"> | |
<div class="row"> | |
<img class="col-md-8 offset-2 img-fluid" src="~/img/feature_disabled.png" alt="feature disavled" /> | |
</div> | |
<div class="text-center"> | |
<p class="lead "><b>@Model.FeatureName</b> feature you are trying to access is disabled. Planned date for @Model.FeatureName feature to come online is on <b>@Model.GoLiveDate.ToLocalTime()</b>.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace MusicStore.Web.Models | |
{ | |
public class DisabledFeatureViewModel | |
{ | |
public string FeatureName { get; set; } | |
public DateTimeOffset GoLiveDate { get; set; } | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
using Microsoft.FeatureManagement.Mvc; | |
using MusicStore.Web.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc.ViewFeatures; | |
using Microsoft.AspNetCore.Mvc.ModelBinding; |