Skip to content

Commit e1a9de4

Browse files
committed
Update Device Detection to the latest library version
1 parent ec40d3b commit e1a9de4

File tree

8 files changed

+61
-6
lines changed

8 files changed

+61
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ To run these samples, simply open your command line console, go to each folder a
134134

135135
### Device Detection (1)
136136

137-
The samples in this section rely on [Wangkanai.Detection](https://github.com/wangkanai/Detection) library.
137+
The samples in this section rely on [Wangkanai.Detection](https://github.com/wangkanai/wangkanai/tree/main/Detection) library.
138138

139139
- [Device Detection](/projects/device-detection)
140140

projects/configurations/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
* [Configuration - IOption Array](/projects/configurations/configuration-IOption-array)
5959
Bind array values from appsettings.json and read them using the IOptions interface
6060
61-
dotnet6
61+
dotnet8

projects/dependency-injection/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828

2929
Use `IServiceProvider.GetRequiredKeyedService<T>(key)` to get different type of implementation instances based on string key in MVC
3030

31-
31+
dotnet8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.activeBackground": "#4b11ba",
4+
"activityBar.background": "#4b11ba",
5+
"activityBar.foreground": "#e7e7e7",
6+
"activityBar.inactiveForeground": "#e7e7e799",
7+
"activityBarBadge.background": "#000000",
8+
"activityBarBadge.foreground": "#e7e7e7",
9+
"commandCenter.border": "#e7e7e799",
10+
"sash.hoverBorder": "#4b11ba",
11+
"statusBar.background": "#380d8b",
12+
"statusBar.debuggingBackground": "#608b0d",
13+
"statusBar.debuggingForeground": "#e7e7e7",
14+
"statusBar.foreground": "#e7e7e7",
15+
"statusBarItem.hoverBackground": "#4b11ba",
16+
"statusBarItem.remoteBackground": "#380d8b",
17+
"statusBarItem.remoteForeground": "#e7e7e7",
18+
"titleBar.activeBackground": "#380d8b",
19+
"titleBar.activeForeground": "#e7e7e7",
20+
"titleBar.inactiveBackground": "#380d8b99",
21+
"titleBar.inactiveForeground": "#e7e7e799"
22+
},
23+
"peacock.color": "#380d8b"
24+
}

projects/device-detection/Program.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
using Wangkanai.Detection;
2+
using Wangkanai.Detection.Services;
23

34
var builder = WebApplication.CreateBuilder();
4-
builder.Services.AddDetectionCore().AddDevice();
5+
builder.Services.AddDetection();
56

67
var app = builder.Build();
78

89
//These are the four default services available at Configure
910
app.Run(context =>
1011
{
11-
var device = context.RequestServices.GetService<IDeviceResolver>();
12+
var device = context.RequestServices.GetService<IDetectionService>();
1213

1314
return context.Response.WriteAsync($@"
1415
Useragent : {device.UserAgent}

projects/device-detection/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Device Detection
2+
3+
This is the most basic device detection. You will be able to detect whether the client is a desktop or a mobile client.
4+
5+
dotnet8

projects/device-detection/device-detection.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<ImplicitUsings>true</ImplicitUsings>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Wangkanai.Detection.Device" Version="2.0.1" />
7+
<PackageReference Include="Wangkanai.Detection" Version="8.11.0" />
88
</ItemGroup>
99
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.002.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "device-detection", "device-detection.csproj", "{BCDDC43B-6734-48D6-856A-DC8D744EFC98}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {7A72F4D1-1EBB-4C53-98DD-B5676BAC6F5F}
24+
EndGlobalSection
25+
EndGlobal

0 commit comments

Comments
 (0)