You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-27Lines changed: 0 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,33 +121,6 @@ public class AppleNotification
121
121
```
122
122
Use `[JsonProperty("alert-type")]` attribute to serialize C# properties into JSON properties with dashes.
123
123
124
-
# Setup for ASP.NET Core with Dependency Injection
125
-
126
-
Both `ApnSender` and `FirebaseSender` have dependencies that need to be registered in order to enable DI.
127
-
128
-
1. Register HttpClient in Startup.cs. This will allow injection of HttpClient into the FCM and APN senders:
129
-
130
-
```
131
-
services.AddHttpClient<FirebaseSender>();
132
-
services.AddHttpClient<ApnSender>();
133
-
```
134
-
135
-
2. Register settings object as a singleton:
136
-
137
-
If you've added `ApnSettings` and `FirebaseSettings` into a configuration section, you can bind section directly to settings object from `IConfiguration` available in Startup.cs:
138
-
139
-
```
140
-
var section = configuration.GetSection("ApnSettings");
0 commit comments