files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
33
src/Yavsc.Abstract/Templates/Template.cs
Normal file
33
src/Yavsc.Abstract/Templates/Template.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yavsc.Abstract.Templates
|
||||
{
|
||||
/// <summary>
|
||||
/// A CSharp Razor template.
|
||||
/// </summary>
|
||||
public abstract class Template
|
||||
{
|
||||
|
||||
StringBuilder _buffer ;
|
||||
|
||||
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 virtual void Init() {
|
||||
_buffer = new StringBuilder();
|
||||
}
|
||||
|
||||
public abstract Task ExecuteAsync();
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue