We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec40d3b commit e1a9de4Copy full SHA for e1a9de4
README.md
@@ -134,7 +134,7 @@ To run these samples, simply open your command line console, go to each folder a
134
135
### Device Detection (1)
136
137
-The samples in this section rely on [Wangkanai.Detection](https://github.com/wangkanai/Detection) library.
+The samples in this section rely on [Wangkanai.Detection](https://github.com/wangkanai/wangkanai/tree/main/Detection) library.
138
139
- [Device Detection](/projects/device-detection)
140
projects/configurations/README.md
@@ -58,4 +58,4 @@
58
* [Configuration - IOption Array](/projects/configurations/configuration-IOption-array)
59
Bind array values from appsettings.json and read them using the IOptions interface
60
61
-dotnet6
+dotnet8
projects/dependency-injection/README.md
@@ -28,4 +28,4 @@
28
29
Use `IServiceProvider.GetRequiredKeyedService<T>(key)` to get different type of implementation instances based on string key in MVC
30
31
-
+ dotnet8
projects/device-detection/.vscode/settings.json
@@ -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
@@ -1,14 +1,15 @@
using Wangkanai.Detection;
+using Wangkanai.Detection.Services;
var builder = WebApplication.CreateBuilder();
-builder.Services.AddDetectionCore().AddDevice();
+builder.Services.AddDetection();
var app = builder.Build();
//These are the four default services available at Configure
app.Run(context =>
{
- var device = context.RequestServices.GetService<IDeviceResolver>();
+ var device = context.RequestServices.GetService<IDetectionService>();
return context.Response.WriteAsync($@"
Useragent : {device.UserAgent}
projects/device-detection/README.md
@@ -0,0 +1,5 @@
+# Device Detection
+
+This is the most basic device detection. You will be able to detect whether the client is a desktop or a mobile client.
projects/device-detection/device-detection.csproj
@@ -4,6 +4,6 @@
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Wangkanai.Detection.Device" Version="2.0.1" />
+ <PackageReference Include="Wangkanai.Detection" Version="8.11.0" />
</ItemGroup>
</Project>
projects/device-detection/device-detection.sln
@@ -0,0 +1,25 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.002.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "device-detection", "device-detection.csproj", "{BCDDC43B-6734-48D6-856A-DC8D744EFC98}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BCDDC43B-6734-48D6-856A-DC8D744EFC98}.Release|Any CPU.Build.0 = Release|Any CPU
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {7A72F4D1-1EBB-4C53-98DD-B5676BAC6F5F}
25
+EndGlobal
0 commit comments