replaced Json.Serialize with ToJson extension method.

This commit is contained in:
Keivan Beigi 2013-05-29 14:29:51 -07:00
parent 676599c520
commit 8bdf8c31f0
10 changed files with 14 additions and 19 deletions

View file

@ -71,7 +71,7 @@ namespace NzbDrone.Core.Notifications
var instanceType = newNotification.Instance.GetType();
var baseGenArgs = instanceType.BaseType.GetGenericArguments();
newNotification.Settings = (INotifcationSettings) Activator.CreateInstance(baseGenArgs[0]);
newNotification.Settings = (INotifcationSettings)Activator.CreateInstance(baseGenArgs[0]);
newNotification.Implementation = type.Name;
notifications.Add(newNotification);
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Notifications
{
var definition = new NotificationDefinition();
definition.InjectFrom(notification);
definition.Settings = Json.Serialize(notification.Settings);
definition.Settings = notification.Settings.ToJson();
definition = _notificationRepository.Insert(definition);
notification.Id = definition.Id;
@ -97,7 +97,7 @@ namespace NzbDrone.Core.Notifications
{
var definition = _notificationRepository.Get(notification.Id);
definition.InjectFrom(notification);
definition.Settings = Json.Serialize(notification.Settings);
definition.Settings = notification.Settings.ToJson();
_notificationRepository.Update(definition);