-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: started implementing dashboard for cdns
- Loading branch information
Showing
18 changed files
with
216 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
33 changes: 33 additions & 0 deletions
33
src/bielu.Umbraco.Cdn.Azure.FrontDoor/Extensions/BieluUmbracoCdnAzureFrontDoorExtensions.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using bielu.Umbraco.Cdn.Azure.Configuration; | ||
using bielu.Umbraco.Cdn.Azure.Services; | ||
using bielu.Umbraco.Cdn.Services; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Umbraco.Cms.Core.DependencyInjection; | ||
|
||
namespace bielu.Umbraco.Cdn.Azure.Extensions | ||
{ | ||
public static class BieluUmbracoCdnAzureFrontDoorExtensions | ||
{ | ||
public static IUmbracoBuilder AddAzureFrontDoorCdnProvider( | ||
this IUmbracoBuilder builder) | ||
{ | ||
if (builder == null) | ||
throw new ArgumentNullException(nameof(builder)); | ||
builder.Services.Scan(s => | ||
s.FromAssemblies(new List<Assembly>() { typeof(BieluUmbracoCdnAzureFrontDoorExtensions).Assembly }) | ||
.AddClasses(c => c.AssignableTo(typeof(ICdnService))) | ||
.AsImplementedInterfaces() | ||
.WithTransientLifetime()); | ||
builder.Services.AddSingleton(typeof(IFrontDoorClientFactory), typeof(FrontDoorClientFactory)); | ||
builder.Services.AddSingleton(typeof(IArmClientFactory), typeof(ArmClientFactory)); | ||
var positionOptions = new FrontDoorOptions(); | ||
builder.Config.GetSection(FrontDoorOptions.SectionName).Bind(positionOptions); | ||
builder.Services.AddOptions<FrontDoorOptions>().BindConfiguration(FrontDoorOptions.SectionName); | ||
return builder; | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.