Remove trailing whitespace

This commit is contained in:
ta264 2019-12-22 21:24:11 +00:00 committed by Qstick
parent 8d27111f7b
commit d4fa9b7345
273 changed files with 566 additions and 555 deletions

View File

@ -5,7 +5,7 @@ using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCompany("Microsoft Open Technologies, Inc.")]

View File

@ -1,12 +1,12 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Code Analysis results, point to "Suppress Message", and click
// To add a suppression to this file, right-click the message in the
// Code Analysis results, point to "Suppress Message", and click
// "In Suppression File".
// You do not need to add suppressions to this file manually.

View File

@ -1,7 +1,8 @@
<Project>
<!-- Common to all Radarr Projects -->
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>$(SolutionDir)Stylecop.ruleset</CodeAnalysisRuleSet>
<!-- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> -->
<PlatformTarget>AnyCPU</PlatformTarget>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
@ -92,6 +93,16 @@
</PackageReference>
</ItemGroup>
<!-- Set up stylecop -->
<ItemGroup Condition="'$(RadarrProject)'=='true' and '$(RadarrOutputType)'!='Test'">
<!-- StyleCop analysis -->
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<AdditionalFiles Include="$(SolutionDir)stylecop.json" />
</ItemGroup>
<!--
Set runtime identifier to local system type if not specified
-->

View File

@ -27,14 +27,14 @@ namespace Marr.Data
/// </summary>
internal static class DataHelper
{
public static bool HasColumn(this IDataReader dr, string columnName)
{
for (int i=0; i < dr.FieldCount; i++)
{
if (dr.GetName(i).Equals(columnName, StringComparison.InvariantCultureIgnoreCase))
return true;
}
return false;
public static bool HasColumn(this IDataReader dr, string columnName)
{
for (int i=0; i < dr.FieldCount; i++)
{
if (dr.GetName(i).Equals(columnName, StringComparison.InvariantCultureIgnoreCase))
return true;
}
return false;
}
public static string ParameterPrefix(this IDbCommand command)
@ -42,7 +42,7 @@ namespace Marr.Data
string commandType = command.GetType().Name.ToLower();
return commandType.Contains("oracle") ? ":" : "@";
}
/// <summary>
/// Returns the mapped name, or the member name.
/// </summary>

View File

@ -131,8 +131,8 @@ namespace Marr.Data
#region - SP / SQL Mode -
/// <summary>
/// Gets or sets a value that determines whether the DataMapper will
/// use a stored procedure or a sql text command to access
/// Gets or sets a value that determines whether the DataMapper will
/// use a stored procedure or a sql text command to access
/// the database. The default is stored procedure.
/// </summary>
public SqlModes SqlMode { get; set; }
@ -617,7 +617,7 @@ namespace Marr.Data
{
while (reader.Read())
{
// The entire EntityGraph is traversed for each record,
// The entire EntityGraph is traversed for each record,
// and multiple entities are created from each view record.
foreach (EntityGraph lvl in graph)
{

View File

@ -238,14 +238,14 @@ namespace Marr.Data
}
/// <summary>
/// Gets the GroupingKeys for this entity.
/// Gets the GroupingKeys for this entity.
/// GroupingKeys determine when to create and add a new entity to the graph.
/// </summary>
/// <remarks>
/// A simple entity with no relationships will return only its PrimaryKey columns.
/// A parent entity with one-to-one child relationships will include its own PrimaryKeys,
/// and it will recursively traverse all Children with one-to-one relationships and add their PrimaryKeys.
/// A child entity that has a one-to-one relationship with its parent will use the same
/// A child entity that has a one-to-one relationship with its parent will use the same
/// GroupingKeys already defined by its parent.
/// </remarks>
public GroupingKeyCollection GroupingKeyColumns

View File

@ -32,11 +32,11 @@ namespace Marr.Data
DbCommand Command { get; }
/// <summary>
/// Gets or sets a value that determines whether the DataMapper will
/// use a stored procedure or a sql text command to access
/// Gets or sets a value that determines whether the DataMapper will
/// use a stored procedure or a sql text command to access
/// the database. The default is stored procedure.
/// </summary>
SqlModes SqlMode { get; set; }
SqlModes SqlMode { get; set; }
#endregion

View File

@ -181,10 +181,10 @@ namespace Marr.Data
/// <summary>
/// Gets or sets the reflection strategy that the DataMapper will use to load entities.
/// By default the CachedReflector will be used, which provides a performance increase over the SimpleReflector.
/// By default the CachedReflector will be used, which provides a performance increase over the SimpleReflector.
/// However, the SimpleReflector can be used in Medium Trust enviroments.
/// </summary>
///
///
public IReflectionStrategy ReflectionStrategy { get; set; }
#endregion
@ -236,7 +236,7 @@ namespace Marr.Data
/// <summary>
/// Gets or sets the IDBTypeBuilder that is responsible for converting parameter DbTypes based on the parameter value.
/// Defaults to use the DbTypeBuilder.
/// Defaults to use the DbTypeBuilder.
/// You can replace this with a more specific builder if you want more control over the way the parameter types are set.
/// </summary>
public IDbTypeBuilder DbTypeBuilder

View File

@ -198,7 +198,7 @@ namespace Marr.Data.Mapping
}
/// <summary>
/// Tries to add a ColumnMap for the given field name.
/// Tries to add a ColumnMap for the given field name.
/// Throws and exception if field cannot be found.
/// </summary>
private void TryAddColumnMapForField(string fieldName)

View File

@ -99,7 +99,7 @@ namespace Marr.Data.Mapping
}
/// <summary>
/// Parses and orders the parameters from the query text.
/// Parses and orders the parameters from the query text.
/// Filters the list of mapped columns to match the parameters found in the sql query.
/// All parameters starting with the '@' or ':' symbol are matched and returned.
/// </summary>
@ -139,7 +139,7 @@ namespace Marr.Data.Mapping
/// <summary>
/// Set's each column's altname as the given prefix + the column name.
/// Ex:
/// Ex:
/// Original column name: "ID"
/// Passed in prefix: "PRODUCT_"
/// Generated AltName: "PRODUCT_ID"
@ -154,7 +154,7 @@ namespace Marr.Data.Mapping
/// <summary>
/// Set's each column's altname as the column name + the given prefix.
/// Ex:
/// Ex:
/// Original column name: "ID"
/// Passed in suffix: "_PRODUCT"
/// Generated AltName: "ID_PRODUCT"

View File

@ -19,7 +19,7 @@ namespace Marr.Data.Mapping
public FluentMappings(bool publicOnly)
{
_publicOnly = publicOnly;
}
public MappingsFluentEntity<TEntity> Entity<TEntity>()
@ -77,7 +77,7 @@ namespace Marr.Data.Mapping
/// <summary>
/// Creates column mappings for the given type.
/// Maps all properties that are simple types (int, string, DateTime, etc).
/// Maps all properties that are simple types (int, string, DateTime, etc).
/// ICollection properties are not included.
/// </summary>
/// <typeparam name="T">The type that is being built.</typeparam>

View File

@ -28,5 +28,5 @@ namespace Marr.Data.Mapping
ParameterDirection ParamDirection { get; set; }
string TryGetAltName();
}
}

View File

@ -36,7 +36,7 @@ namespace Marr.Data.Mapping
/// <summary>
/// Creates column mappings for the given type.
/// Maps all properties that are simple types (int, string, DateTime, etc).
/// Maps all properties that are simple types (int, string, DateTime, etc).
/// ICollection properties are not included.
/// </summary>
/// <typeparam name="T">The type that is being built.</typeparam>
@ -49,7 +49,7 @@ namespace Marr.Data.Mapping
}
/// <summary>
/// Creates column mappings for the given type.
/// Creates column mappings for the given type.
/// Maps properties that are included in the include list.
/// </summary>
/// <typeparam name="T">The type that is being built.</typeparam>
@ -71,7 +71,7 @@ namespace Marr.Data.Mapping
/// <returns><see cref="ColumnMapCollection"/></returns>
public ColumnMapBuilder<T> BuildColumnsExcept<T>(params string[] propertiesToExclude)
{
return BuildColumns<T>(m =>
return BuildColumns<T>(m =>
m.MemberType == MemberTypes.Property &&
!propertiesToExclude.Contains(m.Name));
}
@ -105,7 +105,7 @@ namespace Marr.Data.Mapping
MapRepository.Instance.Columns[entityType] = columns;
return new ColumnMapBuilder<T>(null, columns);
}
#endregion
#region - Relationships -
@ -118,8 +118,8 @@ namespace Marr.Data.Mapping
/// <returns><see cref="RelationshipBuilder"/></returns>
public RelationshipBuilder<T> BuildRelationships<T>()
{
return BuildRelationships<T>(m =>
m.MemberType == MemberTypes.Property &&
return BuildRelationships<T>(m =>
m.MemberType == MemberTypes.Property &&
typeof(ICollection).IsAssignableFrom((m as PropertyInfo).PropertyType));
}
@ -132,10 +132,10 @@ namespace Marr.Data.Mapping
/// <returns><see cref="RelationshipBuilder"/></returns>
public RelationshipBuilder<T> BuildRelationships<T>(params string[] propertiesToInclude)
{
Func<MemberInfo, bool> predicate = m =>
Func<MemberInfo, bool> predicate = m =>
(
// ICollection properties
m.MemberType == MemberTypes.Property &&
m.MemberType == MemberTypes.Property &&
typeof(ICollection).IsAssignableFrom((m as PropertyInfo).PropertyType) &&
propertiesToInclude.Contains(m.Name)
) || ( // Single entity properties
@ -143,7 +143,7 @@ namespace Marr.Data.Mapping
!typeof(ICollection).IsAssignableFrom((m as PropertyInfo).PropertyType) &&
propertiesToInclude.Contains(m.Name)
);
return BuildRelationships<T>(predicate);
}
@ -176,7 +176,7 @@ namespace Marr.Data.Mapping
MapRepository.Instance.Relationships[entityType] = relationships;
return new RelationshipBuilder<T>(null, relationships);
}
#endregion
#region - Tables -

View File

@ -135,7 +135,7 @@ namespace Marr.Data.Mapping
}
/// <summary>
/// Tries to add a Relationship for the given field name.
/// Tries to add a Relationship for the given field name.
/// Throws and exception if field cannot be found.
/// </summary>
private void TryAddRelationshipForField(string fieldName)

View File

@ -23,9 +23,9 @@ namespace Marr.Data.Mapping.Strategies
}
public Func<MemberInfo, bool> ColumnPredicate;
public Func<MemberInfo, bool> RelationshipPredicate;
public Func<MemberInfo, bool> RelationshipPredicate;
protected override void CreateColumnMap(Type entityType, MemberInfo member, ColumnAttribute columnAtt, ColumnMapCollection columnMaps)
{

View File

@ -20,7 +20,7 @@ using System.Reflection;
namespace Marr.Data.Mapping.Strategies
{
/// <summary>
/// Maps all public properties to DB columns.
/// Maps all public properties to DB columns.
/// </summary>
public class PropertyMapStrategy : AttributeMapStrategy
{

View File

@ -87,7 +87,7 @@ namespace Marr.Data.Mapping.Strategies
ColumnAttribute columnAtt = GetColumnAttribute(member);
CreateColumnMap(entityType, member, columnAtt, columnMaps);
}
return columnMaps;
}
@ -124,7 +124,7 @@ namespace Marr.Data.Mapping.Strategies
return null;
}
/// <summary>
/// Inspect a member and optionally add a ColumnMap.
/// </summary>

View File

@ -19,7 +19,7 @@ using System.Data;
namespace Marr.Data.Parameters
{
/// <summary>
/// Converts from a .NET datatype to the appropriate DB type enum,
/// Converts from a .NET datatype to the appropriate DB type enum,
/// and then adds the value to the appropriate property on the parameter.
/// </summary>
public interface IDbTypeBuilder

View File

@ -37,7 +37,7 @@ namespace Marr.Data.Parameters
Parameter.ParameterName = parameterName;
// Convert null to DBNull.Value
if (value == null)
if (value == null)
value = DBNull.Value;
Type valueType = value.GetType();
@ -59,9 +59,9 @@ namespace Marr.Data.Parameters
else
{
Parameter.Value = value;
}
}
}
//// Determine the correct DbType based on the passed in value type
//IDbTypeBuilder typeBuilder = MapRepository.Instance.DbTypeBuilder;
@ -122,7 +122,7 @@ namespace Marr.Data.Parameters
Parameter.Scale = scale;
return this;
}
public ParameterChainMethods Name(string name)
{
Parameter.ParameterName = name;

View File

@ -21,7 +21,7 @@ namespace Marr.Data.QGen
public string Generate()
{
return string.Format("DELETE FROM {0} {1} ",
Dialect.CreateToken(TargetTable.Name),
Dialect.CreateToken(TargetTable.Name),
WhereClause);
}
}

View File

@ -8,7 +8,7 @@ using System.Linq.Expressions;
namespace Marr.Data.QGen
{
///<summary>
/// Expression visitor
/// Expression visitor
///</summary>
public class ExpressionVisitor
{

View File

@ -157,7 +157,7 @@ namespace Marr.Data.QGen
_db.CloseConnection();
}
if (_generateQuery)
{
// Return to previous sql mode

View File

@ -6,7 +6,7 @@ using System.Linq.Expressions;
namespace Marr.Data.QGen
{
/// <summary>
/// This class overrides the WhereBuilder which utilizes the ExpressionVisitor base class,
/// This class overrides the WhereBuilder which utilizes the ExpressionVisitor base class,
/// and it is responsible for translating the lambda expression into a "JOIN ON" clause.
/// It populates the protected string builder, which outputs the "JOIN ON" clause when the ToString method is called.
/// </summary>

View File

@ -27,7 +27,7 @@ namespace Marr.Data.QGen
public string Generate()
{
// Decide which type of paging query to create
if (_innerQuery.IsView || _innerQuery.IsJoin)
{
return ComplexPaging();
@ -56,7 +56,7 @@ namespace Marr.Data.QGen
return sql.ToString();
}
/// <summary>
/// Generates a query that pages a view or joined inner query.
/// </summary>
@ -165,7 +165,7 @@ namespace Marr.Data.QGen
{
orderBy = orderBy.Replace(string.Format("[{0}].", t.Alias), "");
}
sql.AppendFormat(", ROW_NUMBER() OVER ({0}) As RowNumber ", orderBy);
}

View File

@ -190,7 +190,7 @@ namespace Marr.Data.QGen
_isGraph = true;
return this;
}
public virtual QueryBuilder<T> Page(int pageNumber, int pageSize)
{
_enablePaging = true;
@ -198,7 +198,7 @@ namespace Marr.Data.QGen
_take = pageSize;
return this;
}
private string[] ParseChildrenToLoad(Expression<Func<T, object>>[] childrenToLoad)
{
List<string> entitiesToLoad = new List<string>();
@ -208,7 +208,7 @@ namespace Marr.Data.QGen
{
MemberInfo member = (exp.Body as MemberExpression).Member;
entitiesToLoad.Add(member.Name);
}
return entitiesToLoad.ToArray();

View File

@ -16,7 +16,7 @@ namespace Marr.Data.QGen
private const string DB_OracleDataAccessClient = "Oracle.DataAccess.Client.OracleClientFactory";
private const string DB_FireBirdClient = "FirebirdSql.Data.FirebirdClient.FirebirdClientFactory";
private const string DB_SQLiteClient = "System.Data.SQLite.SQLiteFactory";
public static IQuery CreateUpdateQuery(ColumnMapCollection columns, IDataMapper dataMapper, string target, string whereClause)
{
Dialect dialect = CreateDialect(dataMapper);

View File

@ -10,7 +10,7 @@ namespace Marr.Data.QGen
{
_innerQuery = innerQuery;
}
public string Generate()
{
// Decide which type of paging query to create
@ -108,12 +108,12 @@ namespace Marr.Data.QGen
}
/*
WITH GroupCTE AS
WITH GroupCTE AS
(
SELECT [t0].[ID],[t0].[OrderName],[t1].[ID] AS OrderItemID,[t1].[OrderID],[t1].[ItemDescription],[t1].[Price],
ROW_NUMBER() OVER (PARTITION BY [t0].[ID] ORDER BY [t0].[OrderName]) As GroupRow
FROM [Order] [t0]
LEFT JOIN [OrderItem] [t1] ON (([t0].[ID] = [t1].[OrderID]))
SELECT [t0].[ID],[t0].[OrderName],[t1].[ID] AS OrderItemID,[t1].[OrderID],[t1].[ItemDescription],[t1].[Price],
ROW_NUMBER() OVER (PARTITION BY [t0].[ID] ORDER BY [t0].[OrderName]) As GroupRow
FROM [Order] [t0]
LEFT JOIN [OrderItem] [t1] ON (([t0].[ID] = [t1].[OrderID]))
--WHERE (([t0].[OrderName] = @P0))
)
SELECT * FROM GroupCTE

View File

@ -131,7 +131,7 @@ namespace Marr.Data.QGen
{
sql.Append(OrderBy.ToString());
}
public void BuildGroupBy(StringBuilder sql)
{
var baseTable = this.Tables.First();

View File

@ -85,7 +85,7 @@ namespace Marr.Data.QGen
_sortExpressions.Add(new SortColumn<T>(declaringType, propertyName, SortDirection.Desc));
return this;
}
public virtual SortBuilder<T> OrderBy(string orderByClause)
{
if (string.IsNullOrEmpty(orderByClause))

View File

@ -37,7 +37,7 @@ namespace Marr.Data.QGen
return me;
}
}
public enum SortDirection
{
Asc,

View File

@ -10,11 +10,11 @@ namespace Marr.Data.QGen
{
_innerQuery = innerQuery;
}
public string Generate()
{
StringBuilder sql = new StringBuilder();
BuildSelectCountClause(sql);
if (_innerQuery.IsJoin)
@ -29,7 +29,7 @@ namespace Marr.Data.QGen
return sql.ToString();
}
_innerQuery.BuildFromClause(sql);
_innerQuery.BuildJoinClauses(sql);
_innerQuery.BuildWhereClause(sql);

View File

@ -155,7 +155,7 @@ namespace Marr.Data.QGen
{
_db.OpenConnection();
rowsAffected = _db.Command.ExecuteNonQuery();
_mappingHelper.SetOutputValues<T>(_entity, _mappings.OutputFields);
_mappingHelper.SetOutputValues<T>(_entity, _mappings.OutputFields);
}
finally
{

View File

@ -25,7 +25,7 @@ namespace Marr.Data.QGen
{
get { return _tables; }
}
public override string Name
{
get

View File

@ -49,7 +49,7 @@ namespace Marr.Data.QGen
{
_sb.AppendFormat("{0} ", PrefixText);
base.Visit(filter);
}
}
}
protected virtual string PrefixText
@ -93,7 +93,7 @@ namespace Marr.Data.QGen
case "EndsWith":
Write_EndsWith(expression);
break;
case "In":
Write_In(expression);
break;
@ -148,14 +148,14 @@ namespace Marr.Data.QGen
private object GetRightValue(Expression expression)
{
object rightValue = null;
var simpleConstExp = expression as ConstantExpression;
if (simpleConstExp == null) // Value is not directly passed in as a constant
{
MemberExpression memberExp = expression as MemberExpression;
ConstantExpression constExp = null;
// Value may be nested in multiple levels of objects/properties, so traverse the MemberExpressions
// Value may be nested in multiple levels of objects/properties, so traverse the MemberExpressions
// until a ConstantExpression property value is found, and then unwind the stack to get the value.
var memberNames = new Stack<string>();
@ -218,8 +218,8 @@ namespace Marr.Data.QGen
private string Decode(BinaryExpression expression)
{
bool isRightSideNullConstant = expression.Right.NodeType ==
ExpressionType.Constant &&
bool isRightSideNullConstant = expression.Right.NodeType ==
ExpressionType.Constant &&
((ConstantExpression)expression.Right).Value == null;
if (isRightSideNullConstant)
@ -315,7 +315,7 @@ namespace Marr.Data.QGen
}
return _constantWhereClause;
}
}
}
internal enum WhereAppendType
{

View File

@ -40,7 +40,7 @@ namespace Marr.Data.Reflection
}
/// <summary>
/// Gets the CLR data type of a MemberInfo.
/// Gets the CLR data type of a MemberInfo.
/// If the type is nullable, returns the underlying type.
/// </summary>
/// <param name="member"></param>

View File

@ -7,7 +7,7 @@ namespace Marr.Data
/// <summary>
/// The UnitOfWork class can be used to manage the lifetime of an IDataMapper, from creation to disposal.
/// When used in a "using" statement, the UnitOfWork will create and dispose an IDataMapper.
/// When the SharedContext property is used in a "using" statement,
/// When the SharedContext property is used in a "using" statement,
/// it will create a parent unit of work that will share a single IDataMapper with other units of work,
/// and the IDataMapper will not be disposed until the shared context is disposed.
/// If more than one shared context is created, the IDataMapper will be disposed when the outer most

View File

@ -3,7 +3,7 @@
namespace Marr.Data
{
/// <summary>
/// Works in conjunction with the UnitOfWork to create a new
/// Works in conjunction with the UnitOfWork to create a new
/// shared context that will preserve a single IDataMapper.
/// </summary>
public class UnitOfWorkSharedContext : IDisposable

View File

@ -59,7 +59,7 @@ namespace MonoTorrent.BEncoding
/// <summary>
///
///
/// </summary>
/// <param name="reader"></param>
internal override void DecodeInternal(RawReader reader)
@ -133,7 +133,7 @@ namespace MonoTorrent.BEncoding
}
else
value = BEncodedValue.Decode(reader); // the value is a BEncoded value
torrent.dictionary.Add(key, value);
}

View File

@ -38,7 +38,7 @@ namespace MonoTorrent.BEncoding
{
if (list == null)
throw new ArgumentNullException("list");
this.list = new List<BEncodedValue>(list);
}

View File

@ -56,7 +56,7 @@ namespace MonoTorrent.BEncoding
int written = offset;
buffer[written++] = (byte)'i';
if (number < 0)
{
buffer[written++] = (byte)'-';
@ -171,7 +171,7 @@ namespace MonoTorrent.BEncoding
#region Overridden Methods
/// <summary>
///
///
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
@ -185,7 +185,7 @@ namespace MonoTorrent.BEncoding
}
/// <summary>
///
///
/// </summary>
/// <returns></returns>
public override int GetHashCode()
@ -194,7 +194,7 @@ namespace MonoTorrent.BEncoding
}
/// <summary>
///
///
/// </summary>
/// <returns></returns>
public override string ToString()

View File

@ -87,7 +87,7 @@ namespace MonoTorrent.BEncoding
/// <summary>
/// Decode BEncoded data in the given stream
/// Decode BEncoded data in the given stream
/// </summary>
/// <param name="stream">The stream containing the BEncoded data</param>
/// <returns>BEncodedValue containing the data that was in the stream</returns>
@ -177,7 +177,7 @@ namespace MonoTorrent.BEncoding
/// <summary>
/// Decode BEncoded data in the given stream
/// Decode BEncoded data in the given stream
/// </summary>
/// <param name="stream">The stream containing the BEncoded data</param>
/// <returns>BEncodedValue containing the data that was in the stream</returns>

View File

@ -61,7 +61,7 @@ namespace MonoTorrent
throw new ArgumentException(string.Format("Hash must be {0} bytes in length", HashCodeLength), "hash");
if (hashIndex < 0 || hashIndex > this.count)
throw new ArgumentOutOfRangeException("hashIndex", string.Format("hashIndex must be between 0 and {0}", this.count));
throw new ArgumentOutOfRangeException("hashIndex", string.Format("hashIndex must be between 0 and {0}", this.count));
int start = hashIndex * HashCodeLength;
for (int i = 0; i < HashCodeLength; i++)

View File

@ -100,7 +100,7 @@ namespace MonoTorrent
Check.InfoHash (infoHash);
if (infoHash.Length != 32)
throw new ArgumentException("Infohash must be a base32 encoded 32 character string");
infoHash = infoHash.ToLower();
int infohashOffset =0 ;
byte[] hash = new byte[20];
@ -126,7 +126,7 @@ namespace MonoTorrent
Check.InfoHash (infoHash);
if (infoHash.Length != 40)
throw new ArgumentException("Infohash must be 40 characters long");
byte[] hash = new byte[20];
for (int i = 0; i < hash.Length; i++)
hash[i] = byte.Parse(infoHash.Substring(i * 2, 2), System.Globalization.NumberStyles.HexNumber);

View File

@ -26,7 +26,7 @@ namespace MonoTorrent
foreach (T t in enumerable)
count += action(t);
return count;
}

View File

@ -60,8 +60,8 @@ namespace MonoTorrent
/// <summary>
/// This dictionary is specific for azureus client
/// It can contain
/// This dictionary is specific for azureus client
/// It can contain
/// dht_backup_enable (number)
/// Content (dictionnary)
/// Publisher
@ -651,7 +651,7 @@ namespace MonoTorrent
public static bool TryLoad(Stream stream, out Torrent torrent)
{
Check.Stream(stream);
try
{
torrent = Torrent.Load(stream);
@ -676,7 +676,7 @@ namespace MonoTorrent
{
Check.Url(url);
Check.Location(location);
try
{
torrent = Torrent.Load(url, location);

View File

@ -114,11 +114,11 @@ namespace NzbDrone.Api.Calendar
{
return;
}
var occurrence = calendar.Create<CalendarEvent>();
occurrence.Uid = "NzbDrone_movie_" + movie.Id + (cinemasRelease ? "_cinemas" : "_physical");
occurrence.Status = movie.Status == MovieStatusType.Announced ? EventStatus.Tentative : EventStatus.Confirmed;
occurrence.Start = new CalDateTime(date.Value);
occurrence.End = occurrence.Start;
occurrence.IsAllDay = true;

View File

@ -26,7 +26,7 @@ namespace NzbDrone.Api.Config
{
FirstDayOfWeek = model.FirstDayOfWeek,
CalendarWeekColumnHeader = model.CalendarWeekColumnHeader,
ShortDateFormat = model.ShortDateFormat,
LongDateFormat = model.LongDateFormat,
TimeFormat = model.TimeFormat,

View File

@ -12,7 +12,7 @@ namespace NzbDrone.Api.Indexers
protected override void MapToResource(IndexerResource resource, IndexerDefinition definition)
{
base.MapToResource(resource, definition);
resource.EnableRss = definition.EnableRss;
resource.EnableSearch = definition.EnableAutomaticSearch || definition.EnableInteractiveSearch;
resource.SupportsRss = definition.SupportsRss;

View File

@ -23,7 +23,7 @@ namespace NzbDrone.Api.Indexers
private readonly IPrioritizeDownloadDecision _prioritizeDownloadDecision;
private readonly IDownloadService _downloadService;
private readonly Logger _logger;
private readonly ICached<RemoteMovie> _remoteMovieCache;
public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
@ -46,7 +46,7 @@ namespace NzbDrone.Api.Indexers
//PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
PostValidator.RuleFor(s => s.Guid).NotEmpty();
_remoteMovieCache = cacheManager.GetCache<RemoteMovie>(GetType(), "remoteMovies");
}
@ -117,7 +117,7 @@ namespace NzbDrone.Api.Indexers
{
_remoteMovieCache.Set(decision.RemoteMovie.Release.Guid, decision.RemoteMovie, TimeSpan.FromMinutes(30));
return base.MapDecision(decision, initialWeight);
}
}

View File

@ -39,7 +39,7 @@ namespace NzbDrone.Api.Logs
{
var file = files[i];
var filename = Path.GetFileName(file);
result.Add(new LogFileResource
{
Id = i + 1,
@ -63,7 +63,7 @@ namespace NzbDrone.Api.Logs
return new NotFoundResponse();
var data = _diskProvider.ReadAllText(filePath);
return new TextResponse(data);
}

View File

@ -10,7 +10,7 @@ namespace NzbDrone.Api.Movies
{
public AlternativeTitleResource()
{
}
//Todo: Sorters should be done completely on the client

View File

@ -6,7 +6,7 @@ namespace NzbDrone.Api.Movies
{
public AlternativeYearResource()
{
}
//Todo: Sorters should be done completely on the client

View File

@ -18,7 +18,7 @@ namespace NzbDrone.Api.Movies
//Todo: Sorters should be done completely on the client
//Todo: Is there an easy way to keep IgnoreArticlesWhenSorting in sync between, Series, History, Missing?
//Todo: We should get the entire Profile instead of ID and Name separately
//View Only
public string Title { get; set; }
public List<AlternativeTitleResource> AlternativeTitles { get; set; }
@ -96,9 +96,9 @@ namespace NzbDrone.Api.Movies
long size = model.MovieFile?.Size ?? 0;
bool downloaded = model.MovieFile != null;
MovieFileResource movieFile = model.MovieFile?.ToResource();
/*if(model.MovieFile != null)
{
model.MovieFile.LazyLoad();
@ -110,7 +110,7 @@ namespace NzbDrone.Api.Movies
downloaded = true;
movieFile = model.MovieFile.Value.ToResource();
}*/
//model.AlternativeTitles.LazyLoad();
return new MovieResource
@ -134,18 +134,18 @@ namespace NzbDrone.Api.Movies
//NextAiring
//PreviousAiring
Images = model.Images,
Year = model.Year,
SecondaryYear = model.SecondaryYear,
SecondaryYearSourceId = model.SecondaryYearSourceId,
Path = model.Path,
ProfileId = model.ProfileId,
PathState = model.PathState,
Monitored = model.Monitored,
MinimumAvailability = model.MinimumAvailability,
IsAvailable = model.IsAvailable(),
FolderName = model.FolderName(),
@ -205,7 +205,7 @@ namespace NzbDrone.Api.Movies
Monitored = resource.Monitored,
MinimumAvailability = resource.MinimumAvailability,
Runtime = resource.Runtime,
LastInfoSync = resource.LastInfoSync,
CleanTitle = resource.CleanTitle,

View File

@ -27,7 +27,7 @@ namespace NzbDrone.Api.NetImport
{
return _exclusionService.GetById(id).ToResource();
}
public int AddExclusion(ImportExclusionsResource exclusionResource)
{
var model = exclusionResource.ToModel();

View File

@ -12,7 +12,7 @@ namespace NzbDrone.Api.Notifications
protected override void MapToResource(NotificationResource resource, NotificationDefinition definition)
{
base.MapToResource(resource, definition);
resource.OnGrab = definition.OnGrab;
resource.OnDownload = definition.OnDownload;
resource.OnUpgrade = definition.OnUpgrade;

View File

@ -88,7 +88,7 @@ namespace NzbDrone.Api.Queue
{
var resource = Request.Body.FromJson<QueueResource>();
var trackedDownload = GetTrackedDownload(resource.Id);
_completedDownloadService.Process(trackedDownload, true);
return resource;

View File

@ -10,9 +10,9 @@ namespace NzbDrone.Api.Wanted
{
class MovieMissingModule : MovieModuleWithSignalR
{
public MovieMissingModule(IMovieService movieService,
IUpgradableSpecification qualityUpgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster)
public MovieMissingModule(IMovieService movieService,
IUpgradableSpecification qualityUpgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster)
: base(movieService, qualityUpgradableSpecification, signalRBroadcaster, "wanted/missing")
{
GetResourcePaged = GetMissingMovies;

View File

@ -76,7 +76,7 @@ namespace NzbDrone.Common.Test.DiskTests
.Returns(_folders);
var result = Subject.LookupContents(root, false, false);
result.Directories.Should().HaveCount(_folders.Count - 3);
result.Directories.Should().NotContain(f => f.Name == RECYCLING_BIN);

View File

@ -62,7 +62,7 @@ namespace NzbDrone.Common.Test.DiskTests
{
if (new DriveInfo(driveletter.ToString()).IsReady)
continue;
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST".AsOsAgnostic()));
return;
}

View File

@ -55,7 +55,7 @@ namespace NzbDrone.Common.Test.EnvironmentTests
args.PreservedArguments.Should().Be(preserved);
}
[Test]
public void should_preserver_both()
{

View File

@ -301,7 +301,7 @@ namespace NzbDrone.Common.Disk
public void FileSetLastWriteTime(string path, DateTime dateTime)
{
Ensure.That(path, () => path).IsValidPath();
if (dateTime.Before(DateTimeExtensions.Epoch))
{
dateTime = DateTimeExtensions.Epoch;

View File

@ -97,7 +97,7 @@ namespace NzbDrone.Common.Disk
{
return _path.StartsWith("/");
}
return false;
}
}
@ -112,7 +112,7 @@ namespace NzbDrone.Common.Disk
{
return new OsPath(null);
}
return new OsPath(_path.Substring(0, index), _kind).AsDirectory();
}
}
@ -136,7 +136,7 @@ namespace NzbDrone.Common.Disk
return path;
}
return _path.Substring(index).Trim('\\', '/');
}
}

View File

@ -20,15 +20,15 @@ namespace NzbDrone.Common.EnsureThat.Resources {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ExceptionMessages {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ExceptionMessages() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
@ -42,7 +42,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
@ -56,7 +56,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Empty collection is not allowed..
/// </summary>
@ -65,7 +65,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsEmptyCollection", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Empty Guid is not allowed..
/// </summary>
@ -74,7 +74,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsEmptyGuid", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Expected an expression that evaluates to false..
/// </summary>
@ -83,7 +83,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotFalse", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; is not greater than limit &apos;{1}&apos;..
/// </summary>
@ -92,7 +92,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotGt", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; is not greater than or equal to limit &apos;{1}&apos;..
/// </summary>
@ -101,7 +101,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotGte", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; is &gt; max &apos;{1}&apos;..
/// </summary>
@ -110,7 +110,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToHigh", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string is too long. Must be between &apos;{0}&apos; and &apos;{1}&apos;. Must be between &apos;{0}&apos; and &apos;{1}&apos; but was &apos;{2}&apos; characters long..
/// </summary>
@ -119,7 +119,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToLong", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; is &lt; min &apos;{1}&apos;..
/// </summary>
@ -128,7 +128,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToLow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string is not long enough. Must be between &apos;{0}&apos; and &apos;{1}&apos; but was &apos;{2}&apos; characters long..
/// </summary>
@ -137,7 +137,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotInRange_ToShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; is not lower than limit &apos;{1}&apos;..
/// </summary>
@ -146,7 +146,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotLt", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; is not lower than or equal to limit &apos;{1}&apos;..
/// </summary>
@ -155,7 +155,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotLte", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Value can not be null..
/// </summary>
@ -164,7 +164,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotNull", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string can&apos;t be null or empty..
/// </summary>
@ -173,7 +173,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotNullOrEmpty", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The string can&apos;t be left empty, null or consist of only whitespaces..
/// </summary>
@ -182,7 +182,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotNullOrWhiteSpace", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The param is not of expected type: &apos;{0}&apos;..
/// </summary>
@ -191,7 +191,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotOfType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Expected an expression that evaluates to true..
/// </summary>
@ -200,7 +200,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_IsNotTrue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to value &apos;{0}&apos; does not match &apos;{1}&apos;.
/// </summary>
@ -209,7 +209,7 @@ namespace NzbDrone.Common.EnsureThat.Resources {
return ResourceManager.GetString("EnsureExtensions_NoMatch", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No MemberExpression found in expression: &apos;{0}&apos;..
/// </summary>

View File

@ -47,7 +47,7 @@ namespace NzbDrone.Common.EnvironmentInfo
{
throw new RadarrStartupException("Cannot create AppFolder, Access to the path {0} is denied", _appFolderInfo.AppDataFolder);
}
if (OsInfo.IsWindows)
{

View File

@ -38,7 +38,7 @@ namespace NzbDrone.Common.Extensions
{
return dateTime >= afterDateTime && dateTime <= beforeDateTime;
}
public static DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
}
}

View File

@ -10,7 +10,7 @@
public static readonly HttpAccept JsonCharset = new HttpAccept("application/json;charset=utf-8");
#endif
public static readonly HttpAccept Html = new HttpAccept("text/html");
public string Value { get; private set; }
public HttpAccept(string accept)

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Common.Instrumentation
new Regex(@"iptorrents\.com/[/a-z0-9?&;]*?(?:[?&;](u|tp)=(?<secret>[^&=;]+?))+(?= |;|&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"/fetch/[a-z0-9]{32}/(?<secret>[a-z0-9]{32})", RegexOptions.Compiled),
new Regex(@"getnzb.*?(?<=\?|&)(r)=(?<secret>[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
// Path
new Regex(@"""C:\\Users\\(?<secret>[^\""]+?)(\\|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),
new Regex(@"""/home/(?<secret>[^/""]+?)(/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase),

View File

@ -57,7 +57,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry
private static readonly HashSet<string> IncludeExceptionMessageTypes = new HashSet<string> {
"SQLiteException"
};
private static readonly IDictionary<LogLevel, SentryLevel> LoggingLevelMap = new Dictionary<LogLevel, SentryLevel>
{
{LogLevel.Debug, SentryLevel.Debug},
@ -244,7 +244,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry
{
return false;
}
if (FilteredExceptionMessages.Any(x => logEvent.Exception.Message.Contains(x)))
{
return false;

View File

@ -55,7 +55,7 @@ namespace NzbDrone.Common.OAuth
#endif
/// <summary>
/// Generates a random 16-byte lowercase alphanumeric string.
/// Generates a random 16-byte lowercase alphanumeric string.
/// </summary>
/// <seealso href="http://oauth.net/core/1.0#nonce"/>
/// <returns></returns>
@ -259,7 +259,7 @@ namespace NzbDrone.Common.OAuth
}
/// <summary>
/// Creates a request elements concatentation value to send with a request.
/// Creates a request elements concatentation value to send with a request.
/// This is also known as the signature base.
/// </summary>
/// <seealso href="http://oauth.net/core/1.0#rfc.section.9.1.3"/>
@ -276,7 +276,7 @@ namespace NzbDrone.Common.OAuth
var requestMethod = string.Concat(method.ToUpper(), "&");
var requestUrl = string.Concat(UrlEncodeRelaxed(ConstructRequestUrl(new Uri(url))), "&");
var requestParameters = UrlEncodeRelaxed(NormalizeRequestParameters(parameters));
sb.Append(requestMethod);
sb.Append(requestUrl);
sb.Append(requestParameters);
@ -293,7 +293,7 @@ namespace NzbDrone.Common.OAuth
/// <param name="signatureBase">The signature base</param>
/// <param name="consumerSecret">The consumer key</param>
/// <returns></returns>
public static string GetSignature(OAuthSignatureMethod signatureMethod,
public static string GetSignature(OAuthSignatureMethod signatureMethod,
string signatureBase,
string consumerSecret)
{
@ -311,7 +311,7 @@ namespace NzbDrone.Common.OAuth
/// <param name="consumerSecret">The consumer key</param>
/// <returns></returns>
public static string GetSignature(OAuthSignatureMethod signatureMethod,
OAuthSignatureTreatment signatureTreatment,
OAuthSignatureTreatment signatureTreatment,
string signatureBase,
string consumerSecret)
{
@ -327,7 +327,7 @@ namespace NzbDrone.Common.OAuth
/// <param name="consumerSecret">The consumer secret</param>
/// <param name="tokenSecret">The token secret</param>
/// <returns></returns>
public static string GetSignature(OAuthSignatureMethod signatureMethod,
public static string GetSignature(OAuthSignatureMethod signatureMethod,
string signatureBase,
string consumerSecret,
string tokenSecret)
@ -345,7 +345,7 @@ namespace NzbDrone.Common.OAuth
/// <param name="consumerSecret">The consumer secret</param>
/// <param name="tokenSecret">The token secret</param>
/// <returns></returns>
public static string GetSignature(OAuthSignatureMethod signatureMethod,
public static string GetSignature(OAuthSignatureMethod signatureMethod,
OAuthSignatureTreatment signatureTreatment,
string signatureBase,
string consumerSecret,

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Common.OAuth
get
{
var parameters = this.Where(p => p.Name.Equals(name));
if(parameters.Count() == 0)
{
return null;
@ -142,7 +142,7 @@ namespace NzbDrone.Common.OAuth
public virtual void Add(WebParameter parameter)
{
_parameters.Add(parameter);
}

View File

@ -11,17 +11,17 @@ namespace NzbDrone.Common.TPL
/// <summary>Whether the current thread is processing work items.</summary>
[ThreadStatic]
private static bool _currentThreadIsProcessingItems;
/// <summary>The list of tasks to be executed.</summary>
private readonly LinkedList<Task> _tasks = new LinkedList<Task>(); // protected by lock(_tasks)
/// <summary>The maximum concurrency level allowed by this scheduler.</summary>
/// <summary>The list of tasks to be executed.</summary>
private readonly LinkedList<Task> _tasks = new LinkedList<Task>(); // protected by lock(_tasks)
/// <summary>The maximum concurrency level allowed by this scheduler.</summary>
private readonly int _maxDegreeOfParallelism;
/// <summary>Whether the scheduler is currently processing work items.</summary>
private int _delegatesQueuedOrRunning = 0; // protected by lock(_tasks)
/// <summary>Whether the scheduler is currently processing work items.</summary>
private int _delegatesQueuedOrRunning = 0; // protected by lock(_tasks)
/// <summary>
/// Initializes an instance of the LimitedConcurrencyLevelTaskScheduler class with the
/// specified degree of parallelism.
/// </summary>
/// <summary>
/// Initializes an instance of the LimitedConcurrencyLevelTaskScheduler class with the
/// specified degree of parallelism.
/// </summary>
/// <param name="maxDegreeOfParallelism">The maximum degree of parallelism provided by this scheduler.</param>
public LimitedConcurrencyLevelTaskScheduler(int maxDegreeOfParallelism)
{
@ -29,12 +29,12 @@ namespace NzbDrone.Common.TPL
_maxDegreeOfParallelism = maxDegreeOfParallelism;
}
/// <summary>Queues a task to the scheduler.</summary>
/// <summary>Queues a task to the scheduler.</summary>
/// <param name="task">The task to be queued.</param>
protected sealed override void QueueTask(Task task)
{
// Add the task to the list of tasks to be processed. If there aren't enough
// delegates currently queued or running to process tasks, schedule another.
// Add the task to the list of tasks to be processed. If there aren't enough
// delegates currently queued or running to process tasks, schedule another.
lock (_tasks)
{
_tasks.AddLast(task);
@ -46,26 +46,26 @@ namespace NzbDrone.Common.TPL
}
}
/// <summary>
/// Informs the ThreadPool that there's work to be executed for this scheduler.
/// </summary>
/// <summary>
/// Informs the ThreadPool that there's work to be executed for this scheduler.
/// </summary>
private void NotifyThreadPoolOfPendingWork()
{
ThreadPool.UnsafeQueueUserWorkItem(_ =>
{
// Note that the current thread is now processing work items.
// Note that the current thread is now processing work items.
// This is necessary to enable inlining of tasks into this thread.
_currentThreadIsProcessingItems = true;
try
{
// Process all available items in the queue.
// Process all available items in the queue.
while (true)
{
Task item;
lock (_tasks)
{
// When there are no more items to be processed,
// note that we're done processing, and get out.
// When there are no more items to be processed,
// note that we're done processing, and get out.
if (_tasks.Count == 0)
{
--_delegatesQueuedOrRunning;
@ -77,44 +77,44 @@ namespace NzbDrone.Common.TPL
_tasks.RemoveFirst();
}
// Execute the task we pulled out of the queue
// Execute the task we pulled out of the queue
base.TryExecuteTask(item);
}
}
// We're done processing items on the current thread
// We're done processing items on the current thread
finally { _currentThreadIsProcessingItems = false; }
}, null);
}
/// <summary>Attempts to execute the specified task on the current thread.</summary>
/// <summary>Attempts to execute the specified task on the current thread.</summary>
/// <param name="task">The task to be executed.</param>
/// <param name="taskWasPreviouslyQueued"></param>
/// <returns>Whether the task could be executed on the current thread.</returns>
/// <returns>Whether the task could be executed on the current thread.</returns>
protected sealed override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
{
// If this thread isn't already processing a task, we don't support inlining
// If this thread isn't already processing a task, we don't support inlining
if (!_currentThreadIsProcessingItems) return false;
// If the task was previously queued, remove it from the queue
// If the task was previously queued, remove it from the queue
if (taskWasPreviouslyQueued) TryDequeue(task);
// Try to run the task.
// Try to run the task.
return base.TryExecuteTask(task);
}
/// <summary>Attempts to remove a previously scheduled task from the scheduler.</summary>
/// <summary>Attempts to remove a previously scheduled task from the scheduler.</summary>
/// <param name="task">The task to be removed.</param>
/// <returns>Whether the task could be found and removed.</returns>
/// <returns>Whether the task could be found and removed.</returns>
protected sealed override bool TryDequeue(Task task)
{
lock (_tasks) return _tasks.Remove(task);
}
/// <summary>Gets the maximum concurrency level supported by this scheduler.</summary>
/// <summary>Gets the maximum concurrency level supported by this scheduler.</summary>
public sealed override int MaximumConcurrencyLevel => _maxDegreeOfParallelism;
/// <summary>Gets an enumerable of the tasks currently scheduled on this scheduler.</summary>
/// <returns>An enumerable of the tasks currently scheduled.</returns>
/// <summary>Gets an enumerable of the tasks currently scheduled on this scheduler.</summary>
/// <returns>An enumerable of the tasks currently scheduled.</returns>
protected sealed override IEnumerable<Task> GetScheduledTasks()
{
bool lockTaken = false;

View File

@ -676,7 +676,7 @@ namespace TinyIoC
{
/// <summary>
/// Attempt to resolve type, even if the type isn't registered.
///
///
/// Registered types/options will always take precedence.
/// </summary>
AttemptResolve,
@ -689,7 +689,7 @@ namespace TinyIoC
/// <summary>
/// Attempt to resolve unregistered type if requested type is generic
/// and no registration exists for the specific generic parameters used.
///
///
/// Registered types/options will always take precedence.
/// </summary>
GenericsOnly
@ -904,7 +904,7 @@ namespace TinyIoC
#endif
/// <summary>
/// Switches to a custom lifetime manager factory if possible.
///
///
/// Usually used for RegisterOptions "To*" extension methods such as the ASP.Net per-request one.
/// </summary>
/// <param name="instance">RegisterOptions instance</param>
@ -994,7 +994,7 @@ namespace TinyIoC
#region Registration
/// <summary>
/// Attempt to automatically register all non-generic classes and interfaces in the current app domain.
///
///
/// If more than one class implements an interface then only one implementation will be registered
/// although no error will be thrown.
/// </summary>
@ -1010,7 +1010,7 @@ namespace TinyIoC
/// <summary>
/// Attempt to automatically register all non-generic classes and interfaces in the current app domain.
/// Types will only be registered if they pass the supplied registration predicate.
///
///
/// If more than one class implements an interface then only one implementation will be registered
/// although no error will be thrown.
/// </summary>
@ -1056,7 +1056,7 @@ namespace TinyIoC
/// <summary>
/// Attempt to automatically register all non-generic classes and interfaces in the specified assemblies
///
///
/// If more than one class implements an interface then only one implementation will be registered
/// although no error will be thrown.
/// </summary>
@ -1069,7 +1069,7 @@ namespace TinyIoC
/// <summary>
/// Attempt to automatically register all non-generic classes and interfaces in the specified assemblies
/// Types will only be registered if they pass the supplied registration predicate.
///
///
/// If more than one class implements an interface then only one implementation will be registered
/// although no error will be thrown.
/// </summary>
@ -1361,7 +1361,7 @@ namespace TinyIoC
/// <summary>
/// Register multiple implementations of a type.
///
///
/// Internally this registers each implementation using the full name of the class as its registration name.
/// </summary>
/// <typeparam name="RegisterType">Type that each implementation implements</typeparam>
@ -1374,7 +1374,7 @@ namespace TinyIoC
/// <summary>
/// Register multiple implementations of a type.
///
///
/// Internally this registers each implementation using the full name of the class as its registration name.
/// </summary>
/// <param name="registrationType">Type that each implementation implements</param>
@ -1720,7 +1720,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <param name="resolveType">Type to resolve</param>
@ -1736,7 +1736,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <param name="resolveType">Type to resolve</param>
@ -1753,7 +1753,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <param name="resolveType">Type to resolve</param>
@ -1770,7 +1770,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <param name="resolveType">Type to resolve</param>
@ -1845,7 +1845,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <typeparam name="ResolveType">Type to resolve</typeparam>
@ -1862,7 +1862,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <typeparam name="ResolveType">Type to resolve</typeparam>
@ -1880,7 +1880,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <typeparam name="ResolveType">Type to resolve</typeparam>
@ -1898,7 +1898,7 @@ namespace TinyIoC
///
/// Parameters are used in conjunction with normal container resolution to find the most suitable constructor (if one exists).
/// All user supplied parameters must exist in at least one resolvable constructor of RegisterType or resolution will fail.
///
///
/// Note: Resolution may still fail if user defined factory registations fail to construct objects when called.
/// </summary>
/// <typeparam name="ResolveType">Type to resolve</typeparam>
@ -2360,7 +2360,7 @@ namespace TinyIoC
{
/// <summary>
/// Whether to assume this factory sucessfully constructs its objects
///
///
/// Generally set to true for delegate style factories as CanResolve cannot delve
/// into the delegates they contain.
/// </summary>
@ -2638,7 +2638,7 @@ namespace TinyIoC
/// <summary>
/// Stores an particular instance to return for a type
///
///
/// Stores the instance with a weak reference
/// </summary>
private class WeakInstanceFactory : ObjectFactoryBase, IDisposable
@ -3427,7 +3427,7 @@ namespace TinyIoC
var isParameterOverload = parameters.ContainsKey(parameter.Name);
//#if NETFX_CORE
//#if NETFX_CORE
// if (parameter.ParameterType.GetTypeInfo().IsPrimitive && !isParameterOverload)
//#else
if (parameter.ParameterType.IsPrimitive() && !isParameterOverload)
@ -3578,7 +3578,7 @@ namespace TinyIoC
// We could lock the cache here, but there's no real side
// effect to two threads creating the same ObjectConstructor
// at the same time, compared to the cost of a lock for
// at the same time, compared to the cost of a lock for
// every creation.
var constructorParams = constructor.GetParameters();
var lambdaParams = Expression.Parameter(typeof(object[]), "parameters");

View File

@ -42,7 +42,7 @@ namespace NzbDrone.Core.Test.Datastore
MapRepository.Instance.RegisterTypeConverter(typeof(List<EmbeddedType>), new EmbeddedDocumentConverter());
MapRepository.Instance.RegisterTypeConverter(typeof(EmbeddedType), new EmbeddedDocumentConverter());
MapRepository.Instance.RegisterTypeConverter(typeof(int), new Int32Converter());
}

View File

@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration
c.Insert.IntoTable("Tags").Row(new
{
Label = "test"
Label = "test"
});
});

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration
{
var db = WithMigrationTestDb(c =>
{
c.Insert.IntoTable("DownloadClients").Row(new
c.Insert.IntoTable("DownloadClients").Row(new
{
Enable = 1,
Name = "Deluge",

View File

@ -15,7 +15,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration
{
var db = WithMigrationTestDb(c =>
{
c.Insert.IntoTable("Notifications").Row(new
c.Insert.IntoTable("Notifications").Row(new
{
OnGrab = false,
OnDownload = false,
@ -71,7 +71,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration
OnUpgrade = false,
Name = "PushBullet",
Implementation = "PushBullet",
Settings = new
Settings = new
{
ApiKey = "my_api_key",
DeviceId = deviceId

View File

@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.Datastore.Migration
{
var db = WithMigrationTestDb(c =>
{
c.Insert.IntoTable("Indexers").Row(new
c.Insert.IntoTable("Indexers").Row(new
{
Name = "Kickass_wrong_url",
Implementation = "KickassTorrents",

View File

@ -64,7 +64,7 @@ namespace NzbDrone.Core.Test.Datastore.SqliteSchemaDumperTests
result.Columns.First().Name.Should().Be("MyId");
result.Columns.First().Type.Should().BeNull();
}
[Test]
public void should_ignore_unknown_symbols()
{

View File

@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
_remoteEpisode = new RemoteMovie();
_remoteEpisode.Release = new ReleaseInfo();
_remoteEpisode.Movie = new Movie();
_delayProfile = new DelayProfile();
Mocker.GetMock<IDelayProfileService>()

View File

@ -31,7 +31,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
{
_remoteMovie.Release.Container = container;
}
[Test]
public void should_return_true_if_no_container_specified()
{

View File

@ -57,7 +57,7 @@ namespace NzbDrone.Core.Test.Download.DownloadApprovedReportsTests
MovieTitle = "A Movie",
},
Movie = movie,
Release = new ReleaseInfo()
{
PublishDate = DateTime.UtcNow,

View File

@ -119,7 +119,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
.Returns("CBC2F069FE8BB2F544EAE707D75BCD3DE9DCF951".ToLower())
.Callback(PrepareClientToReturnQueuedItem);
}
protected virtual void GivenTorrents(List<DelugeTorrent> torrents)
{
if (torrents == null)
@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
protected void PrepareClientToReturnQueuedItem()
{
GivenTorrents(new List<DelugeTorrent>
GivenTorrents(new List<DelugeTorrent>
{
_queued
});
@ -142,7 +142,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
protected void PrepareClientToReturnDownloadingItem()
{
GivenTorrents(new List<DelugeTorrent>
GivenTorrents(new List<DelugeTorrent>
{
_downloading
});
@ -150,7 +150,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
protected void PrepareClientToReturnFailedItem()
{
GivenTorrents(new List<DelugeTorrent>
GivenTorrents(new List<DelugeTorrent>
{
_failed
});

View File

@ -565,7 +565,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
var item = Subject.GetItems().Single();
item.CanBeRemoved.Should().BeFalse();
item.CanMoveFiles.Should().BeFalse();
var item2 = Subject.GetItems().Single();
Mocker.GetMock<IQBittorrentProxy>()

View File

@ -144,7 +144,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
.Setup(s => s.AddTorrentFromData(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<TransmissionSettings>()))
.Callback(PrepareClientToReturnQueuedItem);
}
protected virtual void GivenTorrents(List<TransmissionTorrent> torrents)
{
if (torrents == null)
@ -159,7 +159,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
protected void PrepareClientToReturnQueuedItem()
{
GivenTorrents(new List<TransmissionTorrent>
GivenTorrents(new List<TransmissionTorrent>
{
_queued
});
@ -167,7 +167,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
protected void PrepareClientToReturnDownloadingItem()
{
GivenTorrents(new List<TransmissionTorrent>
GivenTorrents(new List<TransmissionTorrent>
{
_downloading
});
@ -175,7 +175,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
protected void PrepareClientToReturnFailedItem()
{
GivenTorrents(new List<TransmissionTorrent>
GivenTorrents(new List<TransmissionTorrent>
{
_failed
});

View File

@ -74,7 +74,7 @@ namespace NzbDrone.Core.Test.Download
{
var mock = WithUsenetClient();
mock.Setup(s => s.Download(It.IsAny<RemoteMovie>()));
Subject.DownloadReport(_parseResult);
VerifyEventPublished<MovieGrabbedEvent>();
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Test.Download
{
var mock = WithUsenetClient();
mock.Setup(s => s.Download(It.IsAny<RemoteMovie>()));
Subject.DownloadReport(_parseResult);
mock.Verify(s => s.Download(It.IsAny<RemoteMovie>()), Times.Once());
@ -109,7 +109,7 @@ namespace NzbDrone.Core.Test.Download
var mock = WithUsenetClient();
mock.Setup(s => s.Download(It.IsAny<RemoteMovie>()))
.Callback<RemoteMovie>(v => {
throw new ReleaseDownloadException(v.Release, "Error", new WebException());
throw new ReleaseDownloadException(v.Release, "Error", new WebException());
});
Assert.Throws<ReleaseDownloadException>(() => Subject.DownloadReport(_parseResult));
@ -128,7 +128,7 @@ namespace NzbDrone.Core.Test.Download
var mock = WithUsenetClient();
mock.Setup(s => s.Download(It.IsAny<RemoteMovie>()))
.Callback<RemoteMovie>(v => {
throw new ReleaseDownloadException(v.Release, "Error", new TooManyRequestsException(request, response));
throw new ReleaseDownloadException(v.Release, "Error", new TooManyRequestsException(request, response));
});
Assert.Throws<ReleaseDownloadException>(() => Subject.DownloadReport(_parseResult));

View File

@ -69,7 +69,7 @@ namespace NzbDrone.Core.Test.Download.Pending.PendingReleaseServiceTests
Mocker.GetMock<IMovieService>()
.Setup(s => s.GetMovie(It.IsAny<int>()))
.Returns(_movie);
Mocker.GetMock<IMovieService>()
.Setup(s => s.GetMovies(It.IsAny<IEnumerable<int>>()))
.Returns(new List<Movie> { _movie });

View File

@ -9,7 +9,7 @@ using NzbDrone.Test.Common;
namespace NzbDrone.Core.Test
{
[TestFixture]
public class FluentTest : CoreTest
{
[TestCase(null, "def", "def")]
@ -87,10 +87,10 @@ namespace NzbDrone.Core.Test
[Test]
public void MaxOrDefault_should_return_zero_when_collection_is_empty()
{
var result = (new List<int>()).MaxOrDefault();
//Resolve
@ -100,10 +100,10 @@ namespace NzbDrone.Core.Test
[Test]
public void MaxOrDefault_should_return_max_when_collection_is_not_empty()
{
var list = new List<int> { 6, 4, 5, 3, 8, 10 };
var result = list.MaxOrDefault();
//Resolve
@ -113,10 +113,10 @@ namespace NzbDrone.Core.Test
[Test]
public void MaxOrDefault_should_return_zero_when_collection_is_null()
{
List<int> list = null;
var result = list.MaxOrDefault();
//Resolve
@ -126,10 +126,10 @@ namespace NzbDrone.Core.Test
[Test]
public void Truncate_should_truncate_strings_to_max_specified_number_of_bytes()
{
var str = ReadAllText("Files/LongOverview.txt");
var resultString = str.Truncate(1000);
//Resolve
@ -140,10 +140,10 @@ namespace NzbDrone.Core.Test
[Test]
public void Truncate_should_not_truncate_string_shorter_than_max_bytes()
{
var str = "Hello World";
var resultString = str.Truncate(1000);
//Resolve
@ -154,10 +154,10 @@ namespace NzbDrone.Core.Test
[Test]
public void MinOrDefault_should_return_zero_when_collection_is_empty()
{
var result = (new List<int>()).MinOrDefault();
//Resolve
@ -167,10 +167,10 @@ namespace NzbDrone.Core.Test
[Test]
public void MinOrDefault_should_return_min_when_collection_is_not_empty()
{
var list = new List<int> { 6, 4, 5, 3, 8, 10 };
var result = list.MinOrDefault();
//Resolve
@ -180,10 +180,10 @@ namespace NzbDrone.Core.Test
[Test]
public void MinOrDefault_should_return_zero_when_collection_is_null()
{
List<int> list = null;
var result = list.MinOrDefault();
//Resolve

View File

@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.Framework
_providerFactory = dataMapper.ProviderFactory;
_connectionString = dataMapper.ConnectionString;
}
private DbConnection OpenConnection()
{
var connection = _providerFactory.CreateConnection();

View File

@ -32,10 +32,10 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
public void should_return_warning_when_both_completeddownloadhandling_and_dronefactory_are_not_configured()
{
GivenCompletedDownloadHandling(false);
Subject.Check().ShouldBeWarning();
}
[Test]
public void should_return_ok_when_no_issues_found()
{

View File

@ -43,7 +43,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests
Mocker.GetMock<IHttpClient>()
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.GET)))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), recentFeed));
var releases = Subject.FetchRecent();
releases.Should().HaveCount(100);

View File

@ -35,7 +35,7 @@ namespace NzbDrone.Core.Test.IndexerTests.OmgwtfnzbsTests
Mocker.GetMock<IHttpClient>()
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.GET)))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), recentFeed));
var releases = Subject.FetchRecent();
releases.Should().HaveCount(100);

View File

@ -31,13 +31,13 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
/// </summary>
private void SetupNLog()
{
// Step 1. Create configuration object
// Step 1. Create configuration object
var config = new LoggingConfiguration();
var fileTarget = new FileTarget();
config.AddTarget("file", fileTarget);
// Step 3. Set target properties
// Step 3. Set target properties
fileTarget.FileName = "${basedir}/log.txt";
fileTarget.Layout = GetStandardLayout();

View File

@ -36,10 +36,10 @@ namespace NzbDrone.Core.Test.MediaCoverTests
private void ExecuteAndVerifyCommand(Movie movie)
{
Subject.HandleAsync(new MovieUpdatedEvent(movie));
Mocker.GetMock<IManageCommandQueue>()
.Verify(v => v.Push(It.Is<EnsureMediaCoversCommand>(c => c.MovieId == movie.Id), It.IsAny<CommandPriority>(), It.IsAny<CommandTrigger>()), Times.Once());
Subject.Execute(new EnsureMediaCoversCommand(movie.Id));
}

View File

@ -199,7 +199,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
Mocker.GetMock<IConfigService>()
.SetupGet(s => s.EnableMediaInfo)
.Returns(false);
GivenFileExists();
GivenSuccessfulScan();
@ -222,7 +222,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
Mocker.GetMock<IConfigService>()
.SetupGet(s => s.EnableMediaInfo)
.Returns(false);
GivenFileExists();
GivenSuccessfulScan();
@ -254,7 +254,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
Mocker.GetMock<IMediaFileService>()
.Verify(v => v.Update(movieFile), Times.Once());
}
[Test]
public void should_not_update_media_info_if_new_info_is_null()
{
@ -270,7 +270,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
movieFile.MediaInfo.Should().NotBeNull();
}
[Test]
public void should_not_save_movie_file_if_new_info_is_null()
{

View File

@ -9,7 +9,7 @@ using System.Collections.Generic;
namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Aggregation.Aggregators
{
[TestFixture]
[TestFixture]
public class AggregateLanguageFixture : CoreTest<AggregateLanguage>
{
private LocalMovie _localMovie;

View File

@ -13,7 +13,7 @@ using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Aggregation.Aggregators
{
[TestFixture]
[TestFixture]
public class AugmentQualityFixture : CoreTest<AggregateQuality>
{
private Mock<IAugmentQuality> _mediaInfoAugmenter;

View File

@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.MediaFiles
ExecuteCommand();
ExceptionVerification.ExpectedWarns(1);
Mocker.GetMock<IMediaFileService>().Verify(s => s.Update(It.IsAny<MovieFile>()), Times.Never());
}

View File

@ -95,12 +95,12 @@ namespace NzbDrone.Core.Test.Messaging.Events
var handlers = new List<IHandleAsync<EventA>>
{
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
AsyncHandlerA1.Object,
};

View File

@ -83,7 +83,7 @@ namespace NzbDrone.Core.Test.NotificationTests
throw new NotImplementedException();
}
}
[Test]

View File

@ -61,7 +61,7 @@ namespace NzbDrone.Core.Test.NotificationTests.Xbmc
{
ImdbId = "tt01000",
Title = "Does not exist"
};
};
}
[Test]

Some files were not shown because too many files have changed in this diff Show More