mirror of
https://github.com/art-ist/mustache-sharp.git
synced 2024-06-16 21:05:32 +00:00
Compare commits
No commits in common. "0b34a4ccee4cddae541ad650d6ebbf47b5bdb002" and "28f4ae31788cffc99c6b5c41710512ad46f255e1" have entirely different histories.
0b34a4ccee
...
28f4ae3178
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- <TargetFramework>netcoreapp2.1</TargetFramework> -->
|
<!-- <TargetFramework>netcoreapp2.1</TargetFramework> -->
|
||||||
<TargetFrameworks>net48;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>NET45;netstandard2.0</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
|
@ -57,7 +57,7 @@ namespace Mustache {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) > Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) > Convert.ToDouble(targetValue);
|
||||||
} catch (Exception /* ex */) {
|
} catch (Exception exception) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,9 +57,13 @@ namespace Mustache {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) >= Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) >= Convert.ToDouble(targetValue);
|
||||||
} catch (Exception /* ex */) {
|
} catch (Exception exception) {
|
||||||
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 /* ex */) {
|
catch (Exception exception) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,10 +57,11 @@ namespace Mustache {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return Convert.ToDouble(condition) <= Convert.ToDouble(targetValue);
|
return Convert.ToDouble(condition) <= Convert.ToDouble(targetValue);
|
||||||
} catch (Exception /* ex */) {
|
} catch (Exception exception) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
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") {
|
||||||
@ -22,7 +25,7 @@ namespace Mustache
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
||||||
return System.Net.WebUtility.UrlDecode(writer.ToString());
|
return HttpUtility.UrlDecode(writer.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
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()
|
||||||
@ -23,7 +26,7 @@ namespace Mustache
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
public override string ConsolidateWriter(TextWriter writer, Dictionary<string, object> arguments) {
|
||||||
return System.Net.WebUtility.UrlEncode(writer.ToString());
|
return HttpUtility.UrlEncode(writer.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user