PropertyExtensions
using AngleSharp.Dom.Css;
namespace AngleSharp.Css
{
internal static class PropertyExtensions
{
public static IPropertyValue Guard<T>(this CssProperty[] properties)
{
if (properties.Length == 1) {
if (!(properties[0].DeclaredValue is T))
return null;
return properties[0].DeclaredValue;
}
return null;
}
}
}