This commit is contained in:
Paul Schneider 2018-04-26 05:20:08 +02:00
commit 949bdf8604
15 changed files with 1370 additions and 234 deletions

View file

@ -0,0 +1,31 @@
using System;
using System.Text;
using System.Threading.Tasks;
namespace Yavsc.Abstract.Templates
{
/// <summary>
/// A CSharp Razor template.
/// </summary>
public abstract class Template
{
StringBuilder _buffer = new StringBuilder();
public virtual void Write(object value)
{ WriteLiteral(value); }
public virtual void WriteLiteral(object value)
{ _buffer.Append(value); }
public string GeneratedText {
get {
return _buffer.ToString();
}
}
public abstract Task ExecuteAsync();
}
}

View file

@ -30,10 +30,16 @@
"Newtonsoft.Json": "9.0.1"
},
"frameworks": {
"dnx451": {
"frameworkAssemblies": {
"System.ComponentModel.DataAnnotations": "4.0.0"
}
},
"net451": {
"frameworkAssemblies": {
"System.ComponentModel.DataAnnotations": "4.0.0"
}
}
}
}
}

View file

@ -2,6 +2,17 @@
"locked": false,
"version": 2,
"targets": {
"DNX,Version=v4.5.1": {
"Newtonsoft.Json/9.0.1": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
},
".NETFramework,Version=v4.5.1": {
"Newtonsoft.Json/9.0.1": {
"type": "package",
@ -13,6 +24,28 @@
}
}
},
"DNX,Version=v4.5.1/debian.9-x86": {
"Newtonsoft.Json/9.0.1": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
},
"DNX,Version=v4.5.1/debian.9-x64": {
"Newtonsoft.Json/9.0.1": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
},
".NETFramework,Version=v4.5.1/debian.9-x86": {
"Newtonsoft.Json/9.0.1": {
"type": "package",
@ -66,6 +99,9 @@
"": [
"Newtonsoft.Json >= 9.0.1"
],
"DNX,Version=v4.5.1": [
"fx/System.ComponentModel.DataAnnotations >= 4.0.0"
],
".NETFramework,Version=v4.5.1": [
"fx/System.ComponentModel.DataAnnotations >= 4.0.0"
]