protected virtual void Write(TextWriter writer)
{
IList<string> mergedList = new List<string>();
bool isSecured = ViewContext.HttpContext.Request.IsSecureConnection;
bool canCompress = ViewContext.HttpContext.Request.CanCompress();
Action<WebAssetItemCollection> append = assets =>
{
IList<string> result = AssetMerger.Merge("text/css", AssetHandlerPath, isSecured, canCompress, assets);
if (!result.IsNullOrEmpty())
{
mergedList.AddRange(result);
}
};
if (!StyleSheets.IsEmpty())
{
append(StyleSheets);
}
if (!mergedList.IsEmpty())
{
foreach (string stylesheet in mergedList)
{
writer.WriteLine("<link type=\"text/css\" href=\"{0}\" rel=\"stylesheet\"/>".FormatWith(stylesheet));
}
}
}