Skip to content

Stream can be safely dispose #10

@aykut-aktas-covergo

Description

@aykut-aktas-covergo

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);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions