Initial population
This commit is contained in:
30
JRCookbookBusiness/Trackback.cs
Normal file
30
JRCookbookBusiness/Trackback.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Microsoft.AspNetCore.Html;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JRCookbookBusiness
|
||||
{
|
||||
public class Trackback
|
||||
{
|
||||
public String TrackbackText = String.Empty;
|
||||
public String TrackbackURL = String.Empty;
|
||||
|
||||
public String GenerateLink()
|
||||
{
|
||||
var builder = new HtmlContentBuilder();
|
||||
builder.AppendFormat("<a href=\"{0}\">", TrackbackURL);
|
||||
builder.AppendFormat("{0}", TrackbackText);
|
||||
builder.AppendHtml("</a>");
|
||||
|
||||
using (var writer = new System.IO.StringWriter())
|
||||
{
|
||||
builder.WriteTo(writer, System.Text.Encodings.Web.HtmlEncoder.Default);
|
||||
return writer.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user