Example #1
0
 public static PushNotificationDeliveryProviderSetting FromProvider(IPushNotificationDeliveryProvider provider)
 {
     return(new PushNotificationDeliveryProviderSetting()
     {
         IsEnabled = false,
         ProviderAssemblyQualifiedName = provider.GetType().AssemblyQualifiedName,
         ProviderConfigurationData = JObject.FromObject(provider.Configuration)
     });
 }
        GetOrCreatePushNotificationDeliveryProviderSettings(IPushNotificationDeliveryProvider provider)
        {
            var settings = NoteContext.TicketDeskPushNotificationSettings.DeliveryProviderSettings.FirstOrDefault(
                s => s.ProviderAssemblyQualifiedName == provider.GetType().AssemblyQualifiedName);

            if (settings == null)
            {
                settings = ApplicationPushNotificationSetting.PushNotificationDeliveryProviderSetting.FromProvider(provider);
                //created new settings, add to context (will not be saved here, but may be committed by caller
                NoteContext.TicketDeskPushNotificationSettings.DeliveryProviderSettings.Add(settings);
            }
            return(settings);
        }
     GetOrCreatePushNotificationDeliveryProviderSettings(IPushNotificationDeliveryProvider provider)
 {
     var settings = NoteContext.TicketDeskPushNotificationSettings.DeliveryProviderSettings.FirstOrDefault(
         s => s.ProviderAssemblyQualifiedName == provider.GetType().AssemblyQualifiedName);
     if (settings == null)
     {
         settings = ApplicationPushNotificationSetting.PushNotificationDeliveryProviderSetting.FromProvider(provider);
         //created new settings, add to context (will not be saved here, but may be committed by caller
         NoteContext.TicketDeskPushNotificationSettings.DeliveryProviderSettings.Add(settings);
     }
     return settings;
 }
 public static PushNotificationDeliveryProviderSetting FromProvider(IPushNotificationDeliveryProvider provider)
 {
     return new PushNotificationDeliveryProviderSetting()
     {
         IsEnabled = false,
         ProviderAssemblyQualifiedName = provider.GetType().AssemblyQualifiedName,
         ProviderConfigurationData = JObject.FromObject(provider.Configuration)
     };
 }