Converted notifications to thingi provider

Fixed: Issues creating and saving Connects
This commit is contained in:
Mark McDowall
2013-10-12 11:44:40 -07:00
parent ff7ce397ab
commit 27da44ba45
51 changed files with 299 additions and 761 deletions
@@ -1,12 +1,23 @@
using System;
using FluentValidation;
using FluentValidation.Results;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.ThingiProvider;
namespace NzbDrone.Core.Notifications.NotifyMyAndroid
{
public class NotifyMyAndroidSettingsValidator : AbstractValidator<NotifyMyAndroidSettings>
{
public NotifyMyAndroidSettingsValidator()
{
RuleFor(c => c.ApiKey).NotEmpty();
}
}
public class NotifyMyAndroidSettings : IProviderConfig
{
private static readonly NotifyMyAndroidSettingsValidator Validator = new NotifyMyAndroidSettingsValidator();
[FieldDefinition(0, Label = "API Key", HelpLink = "http://www.notifymyandroid.com/")]
public String ApiKey { get; set; }
@@ -23,7 +34,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
public ValidationResult Validate()
{
throw new NotImplementedException();
return Validator.Validate(this);
}
}
}