22 lines
514 B
C#
22 lines
514 B
C#
using HtmlAgilityPack;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Beam.Abstractions;
|
|
|
|
namespace Beam.Dynamic {
|
|
public class ContentsDataProvider : IDataProvider<string> {
|
|
public IBinding? Content { get; set; }
|
|
|
|
public string Get(HtmlDocument document) {
|
|
if (Content is null)
|
|
return "";
|
|
|
|
return Content.Select(document)?.InnerText ?? "";
|
|
}
|
|
}
|
|
}
|