Fix errors and warnings

This commit is contained in:
Michael Vesely 2021-12-17 11:21:14 +01:00
parent 5bcd101beb
commit 0b34a4ccee
6 changed files with 13 additions and 24 deletions

View File

@ -57,7 +57,7 @@ namespace Mustache {
try {
return Convert.ToDouble(condition) > Convert.ToDouble(targetValue);
} catch (Exception exception) {
} catch (Exception /* ex */) {
return false;
}

View File

@ -57,13 +57,9 @@ namespace Mustache {
try {
return Convert.ToDouble(condition) >= Convert.ToDouble(targetValue);
} catch (Exception exception) {
} catch (Exception /* ex */) {
return false;
}
return false;
}
/// <summary>

View File

@ -59,7 +59,7 @@ namespace Mustache {
try {
return Convert.ToDouble(condition) < Convert.ToDouble(targetValue);
}
catch (Exception exception) {
catch (Exception /* ex */) {
return false;
}

View File

@ -57,11 +57,10 @@ namespace Mustache {
try {
return Convert.ToDouble(condition) <= Convert.ToDouble(targetValue);
} catch (Exception exception) {
} catch (Exception /* ex */) {
return false;
}
return false;
}
/// <summary>

View File

@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
namespace Mustache {
namespace Mustache
{
class UrlDecodeTagDefinition: ContentTagDefinition {
public UrlDecodeTagDefinition()
: base("urldecode") {
@ -25,7 +22,7 @@ namespace Mustache {
}
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
return HttpUtility.UrlDecode(writer.ToString());
return System.Net.WebUtility.UrlDecode(writer.ToString());
}
}
}

View File

@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
namespace Mustache {
namespace Mustache
{
public class UrlEncodeTagDefinition : ContentTagDefinition {
public UrlEncodeTagDefinition()
@ -26,7 +23,7 @@ namespace Mustache {
}
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
return HttpUtility.UrlEncode(writer.ToString());
return System.Net.WebUtility.UrlEncode(writer.ToString());
}
}
}