ReSharper code cleanup

This commit is contained in:
kay.one 2011-04-09 19:44:01 -07:00
commit e896af5cd0
138 changed files with 2368 additions and 2218 deletions

View file

@ -19,8 +19,8 @@ namespace NzbDrone.Core.Model
public override string ToString()
{
return string.Format("Series:{0} Season:{1} Episode:{2}", SeriesTitle, SeasonNumber, String.Join(",", Episodes));
return string.Format("Series:{0} Season:{1} Episode:{2}", SeriesTitle, SeasonNumber,
String.Join(",", Episodes));
}
}
}

View file

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Core.Repository;
using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Model
{
@ -13,4 +9,4 @@ namespace NzbDrone.Core.Model
public EpisodeFile EpisodeFile { get; set; }
public bool NewDownload { get; set; }
}
}
}

View file

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Model
namespace NzbDrone.Core.Model
{
public class EpisodeSortingType
{
@ -11,4 +6,4 @@ namespace NzbDrone.Core.Model
public string Name { get; set; }
public string Pattern { get; set; }
}
}
}

View file

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Model
namespace NzbDrone.Core.Model
{
public enum EpisodeStatusType
{
@ -11,4 +6,4 @@ namespace NzbDrone.Core.Model
Grabbed = 1,
Downloaded = 2
}
}
}

View file

@ -10,7 +10,7 @@ namespace NzbDrone.Core.Model.Notification
}
/// <summary>
/// Gets or sets the unique id.
/// Gets or sets the unique id.
/// </summary>
/// <value>The Id.</value>
public Guid Id { get; private set; }
@ -20,7 +20,7 @@ namespace NzbDrone.Core.Model.Notification
public BasicNotificationType Type { get; set; }
/// <summary>
/// Gets or sets a value indicating whether or not this message should be automatically dismissed after a period of time.
/// Gets or sets a value indicating whether or not this message should be automatically dismissed after a period of time.
/// </summary>
/// <value><c>true</c> if [auto dismiss]; otherwise, <c>false</c>.</value>
public bool AutoDismiss { get; set; }

View file

@ -18,53 +18,52 @@ namespace NzbDrone.Core.Model.Notification
/// <summary>
/// Gets or sets the unique id.
/// Gets or sets the unique id.
/// </summary>
/// <value>The Id.</value>
public Guid Id { get; private set; }
/// <summary>
/// Gets or sets the title for this notification.
/// Gets or sets the title for this notification.
/// </summary>
/// <value>The title.</value>
public String Title { get; set; }
/// <summary>
/// Gets or sets the current status of this task. this field could be use to show the currently processing item in a long running task.
/// Gets or sets the current status of this task. this field could be use to show the currently processing item in a long running task.
/// </summary>
/// <value>The current status.</value>
public String CurrentStatus { get; set; }
/// <summary>
/// Gets or sets the completion status in percent.
/// Gets or sets the completion status in percent.
/// </summary>
/// <value>The percent complete.</value>
public int PercentComplete
{
get
{
return Convert.ToInt32(Convert.ToDouble(ProgressValue) / Convert.ToDouble(ProgressMax) * 100);
}
get { return Convert.ToInt32(Convert.ToDouble(ProgressValue)/Convert.ToDouble(ProgressMax)*100); }
}
/// <summary>
/// Gets or sets the total number of items that need to be completed
/// Gets or sets the total number of items that need to be completed
/// </summary>
/// <value>The progress max.</value>
public int ProgressMax { get; set; }
/// <summary>
/// Gets or sets the number of items successfully completed.
/// Gets or sets the number of items successfully completed.
/// </summary>
/// <value>The progress value.</value>
public int ProgressValue { get; set; }
/// <summary>
/// Gets or sets the status.
/// Gets or sets the status.
/// </summary>
/// <value>The status.</value>
public ProgressNotificationStatus Status { get; set; }
#region IDisposable Members
public void Dispose()
{
if (Status == ProgressNotificationStatus.InProgress)
@ -73,5 +72,7 @@ namespace NzbDrone.Core.Model.Notification
Status = ProgressNotificationStatus.Failed;
}
}
#endregion
}
}

View file

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Core.Repository;
using NzbDrone.Core.Repository.Quality;
namespace NzbDrone.Core.Model
{
@ -17,4 +12,4 @@ namespace NzbDrone.Core.Model
return Title.EndsWith("(Passworded)", StringComparison.InvariantCultureIgnoreCase);
}
}
}
}

View file

@ -9,4 +9,4 @@
High = 1,
Top = 2
}
}
}

View file

@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Model
namespace NzbDrone.Core.Model
{
public class SceneNameModel
{
public string Name { get; set; }
public int SeriesId { get; set; }
}
}
}

View file

@ -14,6 +14,5 @@ namespace NzbDrone.Core.Model
{
return string.Format("Series:{0} Season:{1}", SeriesTitle, SeasonNumber);
}
}
}

View file

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Model
@ -12,4 +9,4 @@ namespace NzbDrone.Core.Model
public List<Episode> Today { get; set; }
public List<Episode> Week { get; set; }
}
}
}