Fix errors and warnings
This commit is contained in:
parent
5bcd101beb
commit
0b34a4ccee
|
@ -57,7 +57,7 @@ namespace Mustache {
|
|||
|
||||
try {
|
||||
return Convert.ToDouble(condition) > Convert.ToDouble(targetValue);
|
||||
} catch (Exception exception) {
|
||||
} catch (Exception /* ex */) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace Mustache {
|
|||
try {
|
||||
return Convert.ToDouble(condition) < Convert.ToDouble(targetValue);
|
||||
}
|
||||
catch (Exception exception) {
|
||||
catch (Exception /* ex */) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
@ -19,14 +16,14 @@ namespace Mustache {
|
|||
WriterNeedsConsidated = true,
|
||||
};
|
||||
yield return context;
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<TagParameter> GetChildContextParameters() {
|
||||
return new TagParameter[] { new TagParameter("collection") };
|
||||
}
|
||||
|
||||
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