All Sln changes

This commit is contained in:
tidusjar 2016-12-19 20:14:31 +00:00
parent b5855f2644
commit 796f0fc188
615 changed files with 68 additions and 747 deletions

View file

@ -1,35 +0,0 @@
using System;
using Newtonsoft.Json;
namespace Ombi.Core.SettingModels
{
public sealed class SlackNotificationSettings : NotificationSettings
{
public string WebhookUrl { get; set; }
public string Channel { get; set; }
public string Username { get; set; }
[JsonIgnore]
public string Team => SplitWebUrl(3);
[JsonIgnore]
public string Service => SplitWebUrl(4);
[JsonIgnore]
public string Token => SplitWebUrl(5);
private string SplitWebUrl(int index)
{
if (!WebhookUrl.StartsWith("http", StringComparison.InvariantCulture))
{
WebhookUrl = "https://" + WebhookUrl;
}
var split = WebhookUrl.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
return split.Length < index
? string.Empty
: split[index];
}
}
}