Fixed nullables.

This commit is contained in:
Taloth Saldono 2015-10-03 21:19:25 +02:00
parent ccfa13e383
commit 0b219e1169
6 changed files with 15 additions and 15 deletions

View File

@ -89,7 +89,7 @@ namespace NzbDrone.Api.ClientSchema
propertyInfo.SetValue(target, value, null);
}
else if (propertyInfo.PropertyType == typeof(Nullable<Int32>))
else if (propertyInfo.PropertyType == typeof(int?))
{
var value = field.Value.ToString().ParseInt32();
propertyInfo.SetValue(target, value, null);

View File

@ -20,10 +20,10 @@ namespace NzbDrone.Api.Episodes
public bool HasFile { get; set; }
public bool Monitored { get; set; }
public Nullable<Int32> AbsoluteEpisodeNumber { get; set; }
public Nullable<Int32> SceneAbsoluteEpisodeNumber { get; set; }
public Nullable<Int32> SceneEpisodeNumber { get; set; }
public Nullable<Int32> SceneSeasonNumber { get; set; }
public int? AbsoluteEpisodeNumber { get; set; }
public int? SceneAbsoluteEpisodeNumber { get; set; }
public int? SceneEpisodeNumber { get; set; }
public int? SceneSeasonNumber { get; set; }
public bool UnverifiedSceneNumbering { get; set; }
public DateTime? EndTime { get; set; }
public DateTime? GrabDate { get; set; }

View File

@ -4,7 +4,7 @@ namespace NzbDrone.Common.Extensions
{
public static class TryParseExtensions
{
public static Nullable<int> ParseInt32(this string source)
public static int? ParseInt32(this string source)
{
int result = 0;

View File

@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.Datastore
public string PropString { get; set; }
public int PropInt { get; set; }
public bool PropBool { get; set; }
public Nullable<int> PropNullable { get; set; }
public int? PropNullable { get; set; }
public EmbeddedType Embedded { get; set; }
public List<EmbeddedType> EmbeddedList { get; set; }
}

View File

@ -15,9 +15,9 @@ namespace NzbDrone.Core.DataAugmentation.Scene
public interface ISceneMappingService
{
List<string> GetSceneNames(int tvdbId, IEnumerable<int> seasonNumbers);
Nullable<int> FindTvdbId(string title);
int? FindTvdbId(string title);
List<SceneMapping> FindByTvdbId(int tvdbId);
Nullable<Int32> GetSeasonNumber(string title);
int? GetSeasonNumber(string title);
}
public class SceneMappingService : ISceneMappingService,
@ -61,7 +61,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
.Select(m => m.SearchTerm).Distinct().ToList());
}
public Nullable<Int32> FindTvdbId(string title)
public int? FindTvdbId(string title)
{
var mapping = FindMapping(title);
@ -88,7 +88,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
return mappings;
}
public Nullable<Int32> GetSeasonNumber(string title)
public int? GetSeasonNumber(string title)
{
var mapping = FindMapping(title);

View File

@ -25,10 +25,10 @@ namespace NzbDrone.Core.Tv
public DateTime? AirDateUtc { get; set; }
public string Overview { get; set; }
public bool Monitored { get; set; }
public Nullable<Int32> AbsoluteEpisodeNumber { get; set; }
public Nullable<Int32> SceneAbsoluteEpisodeNumber { get; set; }
public Nullable<Int32> SceneSeasonNumber { get; set; }
public Nullable<Int32> SceneEpisodeNumber { get; set; }
public int? AbsoluteEpisodeNumber { get; set; }
public int? SceneAbsoluteEpisodeNumber { get; set; }
public int? SceneSeasonNumber { get; set; }
public int? SceneEpisodeNumber { get; set; }
public bool UnverifiedSceneNumbering { get; set; }
public Ratings Ratings { get; set; }
public List<MediaCover.MediaCover> Images { get; set; }