Skip to content

Commit

Permalink
Fixes the IConvertible warning thrown on Windows Phone reported on #317
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiK committed Feb 2, 2015
1 parent 352b019 commit 7b44bac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Humanizer.Tests/DateHumanizeDefaultStrategyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void HoursFromNowNotTomorrow(int hours, string expected)
[Theory]
[InlineData(1, "yesterday")]
[InlineData(10, "10 days ago")]
[InlineData(28, "28 days ago")]
[InlineData(27, "27 days ago")]
[InlineData(32, "one month ago")]
public void DaysAgo(int days, string expected)
{
Expand All @@ -104,7 +104,7 @@ public void DaysAgo(int days, string expected)
[Theory]
[InlineData(1, "tomorrow")]
[InlineData(10, "10 days from now")]
[InlineData(28, "28 days from now")]
[InlineData(27, "27 days from now")]
[InlineData(32, "one month from now")]
public void DaysFromNow(int days, string expected)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/DehumanizeToEnumTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void HonorsLocalizedDisplayAttribute()
Assert.Equal(EnumUnderTest.MemberWithLocalizedDisplayAttribute, EnumTestsResources.MemberWithLocalizedDisplayAttribute.DehumanizeTo(typeof(EnumUnderTest)));
}

struct DummyStructWithEnumInterfaces : IComparable, IFormattable, IConvertible
struct DummyStructWithEnumInterfaces : IComparable, IFormattable
{
public int CompareTo(object obj)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/EnumDehumanizeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class EnumDehumanizeExtensions
/// <exception cref="NoMatchFoundException">Couldn't find any enum member that matches the string</exception>
/// <returns></returns>
public static TTargetEnum DehumanizeTo<TTargetEnum>(this string input)
where TTargetEnum : struct, IComparable, IFormattable, IConvertible
where TTargetEnum : struct, IComparable, IFormattable
{
return (TTargetEnum)DehumanizeToPrivate(input, typeof(TTargetEnum), OnNoMatch.ThrowsException);
}
Expand Down

0 comments on commit 7b44bac

Please sign in to comment.