OrValueConverter
using AngleSharp.Dom.Css;
using AngleSharp.Parser.Css;
using System.Collections.Generic;
namespace AngleSharp.Css.ValueConverters
{
internal sealed class OrValueConverter : IValueConverter
{
private readonly IValueConverter _previous;
private readonly IValueConverter _next;
public OrValueConverter(IValueConverter previous, IValueConverter next)
{
_previous = previous;
_next = next;
}
public IPropertyValue Convert(IEnumerable<CssToken> value)
{
return _previous.Convert(value) ?? _next.Convert(value);
}
public IPropertyValue Construct(CssProperty[] properties)
{
return _previous.Construct(properties) ?? _next.Construct(properties);
}
}
}