private IFirebase createFeatures(FirebaseType type)
    {
        IFirebase feature = null;

        switch (type)
        {
        case FirebaseType.CloudMessage:
            feature = new CloudMessaging();
            registerCloudMessage(feature as CloudMessaging);
            break;
        }
        feature.Init();
        return(feature);
    }
    public void UnsubscribleTopic(string nameTopic)
    {
        CloudMessaging messagingFeature = null;

        foreach (var feature in ReferenceFeatures)
        {
            if (feature.GetFirebaseType() == FirebaseType.CloudMessage)
            {
                messagingFeature = feature as CloudMessaging;
            }
        }

        if (messagingFeature == null)
        {
            return;
        }

        messagingFeature.UnsubscribleTopic(nameTopic);
    }
 public ScheduledService(DeactivatePastAlerts deactivatePastAlerts, CloudMessaging cloudMessaging)
 {
     _deactivatePastAlerts = deactivatePastAlerts;
     _cloudMessaging       = cloudMessaging;
 }
 private void registerCloudMessage(CloudMessaging feature)
 {
     feature.OnNotificationReceived += OnNotificationReceived;
 }