bellevue_preview.zip
Bellevue_Preview
DemoWeb.sln
Ope.Bellevue.DemoWeb
Ope.Bellevue
bin
Debug
BoneSoft.CSS.dll
Fizzler.dll
Fizzler.Systems.HtmlAgilityPack.dll
HtmlAgilityPack.dll
Ope.Bellevue.dll
Ope.Vss.dll
Ope.Bellevue.csproj
Ope.Bellevue.csproj.user
Parsing
Properties
Renderers
Rendering
Resources
ViewEngine
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ope.Bellevue.Parsing
{
/// <summary>
/// Collection of ElementDeclarations that are positioned to the HtmlDocument tree
/// </summary>
public class ElementDeclarationList : List<ElementDeclaration>
{
public override string ToString()
{
return string.Join(", ", this.Select(d => d.ToString()).ToArray());
}
public void Add(BoneSoft.CSS.RuleSet ruleset, BoneSoft.CSS.Term condition)
{
string selector = string.Join(", ", ruleset.Selectors.Select(s => s.ToString()).ToArray());
foreach (var declr in ruleset.Declarations)
{
var newDeclr = new ElementDeclaration
{
Name = declr.Name,
Condition = condition,
Expression = declr.Expression,
Selector = selector
};
this.Add(newDeclr);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Olli is a .Net developer and architect.
He specializes in Asp.net MVC and other web technologies, XML and lately Domain Specific Languages.
Olli is originally from Finland, but currently works for his own one-man-initiative OPE AG (
www.ope.ag) from Switzerland. He has over 10 years of experience as one of the founding partners and Chief Technology Officer of Quartal group of companies (
www.quartal.com).