Fix errors and warnings
This commit is contained in:
parent
5bcd101beb
commit
0b34a4ccee
|
@ -57,7 +57,7 @@ namespace Mustache {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) > Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) > Convert.ToDouble(targetValue);
|
||||||
} catch (Exception exception) {
|
} catch (Exception /* ex */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,9 @@ namespace Mustache {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) >= Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) >= Convert.ToDouble(targetValue);
|
||||||
} catch (Exception exception) {
|
} catch (Exception /* ex */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace Mustache {
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) < Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) < Convert.ToDouble(targetValue);
|
||||||
}
|
}
|
||||||
catch (Exception exception) {
|
catch (Exception /* ex */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,11 +57,10 @@ namespace Mustache {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) <= Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) <= Convert.ToDouble(targetValue);
|
||||||
} catch (Exception exception) {
|
} catch (Exception /* ex */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace Mustache {
|
namespace Mustache
|
||||||
|
{
|
||||||
class UrlDecodeTagDefinition: ContentTagDefinition {
|
class UrlDecodeTagDefinition: ContentTagDefinition {
|
||||||
public UrlDecodeTagDefinition()
|
public UrlDecodeTagDefinition()
|
||||||
: base("urldecode") {
|
: base("urldecode") {
|
||||||
|
@ -25,7 +22,7 @@ namespace Mustache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
||||||
return HttpUtility.UrlDecode(writer.ToString());
|
return System.Net.WebUtility.UrlDecode(writer.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace Mustache {
|
namespace Mustache
|
||||||
|
{
|
||||||
|
|
||||||
public class UrlEncodeTagDefinition : ContentTagDefinition {
|
public class UrlEncodeTagDefinition : ContentTagDefinition {
|
||||||
public UrlEncodeTagDefinition()
|
public UrlEncodeTagDefinition()
|
||||||
|
@ -26,7 +23,7 @@ namespace Mustache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
||||||
return HttpUtility.UrlEncode(writer.ToString());
|
return System.Net.WebUtility.UrlEncode(writer.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue