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
Depending on where the Stream object comes from, you need to be aware of whether the caller is responsible for disposing of the stream after creating the FirebasePushNotificationSender instance.
Solution: Clearly document in the constructor's documentation or method signature who is responsible for disposing of the stream. If the caller is responsible, provide guidance on when the stream can be safely disposed.
Can be help to this code block :
public FirebasePushNotificationSender(Stream stream)
{
using (stream)
{
var firebaseApp = FirebaseApp.Create(new AppOptions()
{
Credential = GoogleCredential.FromStream(stream)
});
Depending on where the Stream object comes from, you need to be aware of whether the caller is responsible for disposing of the stream after creating the FirebasePushNotificationSender instance.
Solution: Clearly document in the constructor's documentation or method signature who is responsible for disposing of the stream. If the caller is responsible, provide guidance on when the stream can be safely disposed.
Can be help to this code block :
public FirebasePushNotificationSender(Stream stream)
{
using (stream)
{
var firebaseApp = FirebaseApp.Create(new AppOptions()
{
Credential = GoogleCredential.FromStream(stream)
});
this._firebaseMessaging = FirebaseMessaging.GetMessaging(firebaseApp);
}
}
The text was updated successfully, but these errors were encountered: