Skip to content

Commit 734b784

Browse files
Merge pull request #20 from arnaudleclerc/releases/0.8.0
Releases/0.8.0
2 parents 819e270 + 45ab8a8 commit 734b784

10 files changed

Lines changed: 316 additions & 59 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
- main
99
paths:
1010
- src/**
11-
- .github/**
1211

1312
jobs:
1413
build:
Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.IO;
4-
using System.Linq;
5-
using System.Threading.Tasks;
6-
using Microsoft.AspNetCore;
7-
using Microsoft.AspNetCore.Hosting;
8-
using Microsoft.Extensions.Configuration;
9-
using Microsoft.Extensions.Hosting;
10-
using Microsoft.Extensions.Logging;
11-
121
namespace AzureMapsControl.Sample
132
{
3+
using Microsoft.AspNetCore.Hosting;
4+
using Microsoft.Extensions.Hosting;
5+
146
public class Program
157
{
16-
public static void Main(string[] args)
17-
{
18-
CreateHostBuilder(args).Build().Run();
19-
}
8+
public static void Main(string[] args) => CreateHostBuilder(args).Build().Run();
209

2110
public static IHostBuilder CreateHostBuilder(string[] args) =>
22-
Host.CreateDefaultBuilder(args)
23-
.ConfigureWebHostDefaults(webBuilder =>
24-
{
25-
webBuilder.UseStartup<Startup>();
26-
});
11+
Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
2712
}
2813
}

samples/AzureMapsControl.Sample/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"LogLevel": {
44
"Default": "Information",
55
"Microsoft": "Warning",
6-
"Microsoft.Hosting.Lifetime": "Information"
6+
"Microsoft.Hosting.Lifetime": "Information",
7+
"AzureMapsControl.Components": "Information"
78
}
89
},
910
"AllowedHosts": "*"

src/AzureMapsControl.Components/AzureMapsControl.Components.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.0" />
1919
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.0" />
2020
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
21+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
2122
</ItemGroup>
2223

2324
</Project>

src/AzureMapsControl.Components/Configuration/AzureMapsConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace AzureMapsControl.Components.Configuration
22
{
33
using System;
4+
using System.Collections.Generic;
45
using System.Text.Json;
56
using System.Text.Json.Serialization;
67

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
namespace AzureMapsControl.Components.Logger
2+
{
3+
using Microsoft.Extensions.Logging;
4+
5+
internal enum AzureMapLogEvent
6+
{
7+
AzureMap_OnInitialized = 1000,
8+
AzureMap_OnAfterRenderAsync = 1001,
9+
AzureMap_AddControlsAsync = 1002,
10+
AzureMap_ClearSourcesAsync = 1003,
11+
AzureMap_AddSourceAsync = 1004,
12+
AzureMap_AttachDataSourcesCallback = 1005,
13+
AzureMap_RemoveSourceAsync = 1006,
14+
AzureMap_DataSource_ImportDataFromUrlAsync = 1007,
15+
AzureMap_DataSource_AddAsync = 1008,
16+
AzureMap_DataSource_RemoveAsync = 1009,
17+
AzureMap_DataSource_ClearAsync = 1010,
18+
AzureMap_DrawingToolbarEvent = 1011,
19+
AzureMap_AddDrawingToolbarAsync = 1012,
20+
AzureMap_UpdateDrawingToolbarAsync = 1013,
21+
AzureMap_RemoveDrawingToolbarAsync = 1014,
22+
AzureMap_HtmlMarkerEventReceivedAsync = 1015,
23+
AzureMap_ClearHtmlMarkersAsync = 1016,
24+
AzureMap_AddHtmlMarkersAsync = 1017,
25+
AzureMap_RemoveHtmlMarkersAsync = 1018,
26+
AzureMap_UpdateHtmlMarkersAsync = 1019,
27+
AzureMap_LayerEventReceivedAsync = 1020,
28+
AzureMap_ClearLayersAsync = 1021,
29+
AzureMap_AddLayerAsync = 1022,
30+
AzureMap_RemoveLayersAsync = 1023,
31+
AzureMap_MapEventReceivedAsync = 1024,
32+
AzureMap_SetCameraOptionsAsync = 1025,
33+
AzureMap_SetStyleOptionsAsync = 1026,
34+
AzureMap_SetUserInteractionAsync = 1027,
35+
AzureMap_SetTrafficAsync = 1028,
36+
AzureMap_ClearMapAsync = 1029,
37+
AzureMap_AddPopupAsync = 1030,
38+
AzureMap_Popup_OpenAsync = 1031,
39+
AzureMap_Popup_CloseAsync = 1032,
40+
AzureMap_Popup_RemoveAsync = 1033,
41+
AzureMap_Popup_UpdateAsync = 1034,
42+
AzureMap_ClearPopupsAsync = 1035,
43+
AzureMap_PopupEventReceivedAsync = 1036,
44+
MapService_AddMapAsync = 2000
45+
}
46+
47+
internal static class Extensions
48+
{
49+
internal static void LogAzureMapsControlTrace(this ILogger logger, AzureMapLogEvent logEvent, string message, params object[] args) => logger.LogAzureMapsControl(LogLevel.Trace, logEvent, message, args);
50+
internal static void LogAzureMapsControlDebug(this ILogger logger, AzureMapLogEvent logEvent, string message, params object[] args) => logger.LogAzureMapsControl(LogLevel.Debug, logEvent, message, args);
51+
internal static void LogAzureMapsControlInfo(this ILogger logger, AzureMapLogEvent logEvent, string message, params object[] args) => logger.LogAzureMapsControl(LogLevel.Information, logEvent, message, args);
52+
internal static void LogAzureMapsControl(this ILogger logger, LogLevel logLevel, AzureMapLogEvent logEvent, string message, params object[] args) => logger.Log(logLevel, new EventId((int)logEvent), message, args);
53+
}
54+
}

0 commit comments

Comments
 (0)