Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RestSharp.Build/RestSharp.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Framework" />
Expand Down
2 changes: 1 addition & 1 deletion RestSharp.IntegrationTests/StatusCodeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void Handles_Different_Root_Element_On_Error()
var response = client.Execute<Response>(request);

Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
Assert.Equal("Not found!", response.Data.Message);
Assert.Null(response.Data);
}
}

Expand Down
3 changes: 2 additions & 1 deletion RestSharp.Net4/RestSharp.Net4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\RestSharp.xml</DocumentationFile>
<NoWarn>1591,1573,1658,1584</NoWarn>
<NoWarn>1591,1573,1658,1584,1574,1572</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
3 changes: 2 additions & 1 deletion RestSharp.Silverlight/RestSharp.Silverlight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Bin\Release\RestSharp.Silverlight.xml</DocumentationFile>
<NoWarn>1591,1573,1658,1584</NoWarn>
<NoWarn>1591,1573,1658,1584,1574,1572</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
Expand Down
2 changes: 1 addition & 1 deletion RestSharp.Tests/NuSpecUpdateTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class WhenSpecFileIsValid : BaseNuSpecUpdateTest
private string _expectedDescription = "Simple REST and HTTP API Client";
private string _expectedAuthors = "John Sheehan, RestSharp Community";
private string _expectedOwners = "John Sheehan, RestSharp Community";
private Regex _expectedVersion = new Regex(@"^\d+\.\d+\.\d+$", RegexOptions.Compiled);
private Regex _expectedVersion = new Regex(@"^\d+\.\d+\.\d+(-\w+)$", RegexOptions.Compiled);

protected override void Setup()
{
Expand Down
3 changes: 2 additions & 1 deletion RestSharp.WindowsPhone/RestSharp.WindowsPhone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Bin\Release\RestSharp.WindowsPhone.xml</DocumentationFile>
<NoWarn>1591,1573,1658,1584</NoWarn>
<NoWarn>1591,1573,1658,1584,1574,1572</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
Expand Down
4 changes: 3 additions & 1 deletion RestSharp/Deserializers/XmlAttributeDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using RestSharp.Authenticators.OAuth.Extensions;
using RestSharp.Extensions;

namespace RestSharp.Deserializers
Expand Down Expand Up @@ -109,7 +110,8 @@ private void Map(object x, XElement root)

var value = GetValueFromXml(root, name, isAttribute);

if (value == null || value == string.Empty)
var stringValue = value as string;
if (stringValue.IsNullOrBlank())
{
// special case for inline list items
if (type.IsGenericType)
Expand Down
2 changes: 1 addition & 1 deletion RestSharp/Extensions/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static object ChangeType(this object source, Type newType, CultureInfo cu
/// Find a value from a System.Enum by trying several possible variants
/// of the string value of the enum.
/// </summary>
/// <param name="type">Type of enum</typeparam>
/// <param name="type">Type of enum</param>
/// <param name="value">Value for which to search</param>
/// <param name="culture">The culture used to calculate the name variants</param>
/// <returns></returns>
Expand Down
3 changes: 2 additions & 1 deletion RestSharp/RestSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Release\RestSharp.xml</DocumentationFile>
<NoWarn>1591,1573,1658,1584</NoWarn>
<NoWarn>1591,1573,1658,1584,1574,1572</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Build.Framework" />
Expand Down