-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dmitry Kozlov
committed
Nov 19, 2024
1 parent
dad7b21
commit 1d7a851
Showing
15 changed files
with
107 additions
and
104 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Microsoft.Azure.Functions.Worker; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
using System; | ||
using D365_BC = Plumsail.DataSource.Dynamics365.BusinessCentral; | ||
using D365_CRM = Plumsail.DataSource.Dynamics365.CRM; | ||
using SP = Plumsail.DataSource.SharePoint; | ||
|
||
var host = new HostBuilder() | ||
.ConfigureFunctionsWebApplication() | ||
.ConfigureAppConfiguration((context, builder) => { | ||
builder.SetBasePath(Environment.CurrentDirectory) | ||
.AddJsonFile("local.settings.json", optional: true, reloadOnChange: true) | ||
.AddEnvironmentVariables(); | ||
}) | ||
.ConfigureServices((context, services) => { | ||
var configuration = context.Configuration; | ||
|
||
services.AddApplicationInsightsTelemetryWorkerService(); | ||
services.ConfigureFunctionsApplicationInsights(); | ||
|
||
services.Configure<D365_BC.Settings.AppSettings>(configuration.GetSection("Dynamics365.BusinessCentral")); | ||
services.AddTransient<D365_BC.GraphServiceClientProvider>(); | ||
|
||
services.Configure<D365_CRM.Settings.AppSettings>(configuration.GetSection("Dynamics365.CRM")); | ||
services.AddTransient<D365_CRM.HttpClientProvider>(); | ||
|
||
services.Configure<SP.Settings.AppSettings>(configuration.GetSection("SharePoint")); | ||
services.AddTransient<SP.GraphServiceClientProvider>(); | ||
}) | ||
.Build(); | ||
|
||
host.Run(); |
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.