Error executing template "Designs/subsite/_parsed/subpage.parsed.cshtml"
System.TypeInitializationException: The type initializer for 'System.Collections.Generic.EqualityComparer`1' threw an exception. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Collections.Generic.EqualityComparer`1.CreateComparer()
   at System.Collections.Generic.EqualityComparer`1..cctor()
   --- End of inner exception stack trace ---
   at System.Collections.Generic.EqualityComparer`1.get_Default()
   at System.Array.IndexOf[T](T[] array, T value, Int32 startIndex, Int32 count)
   at System.Array.IndexOf[T](T[] array, T value)
   at System.SZArrayHelper.Contains[T](T value)
   at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
   at Microsoft.CodeAnalysis.CSharp.CSharpDiagnosticFilter.Filter(Diagnostic d, Int32 warningLevelOption, NullableContextOptions nullableOption, ReportDiagnostic generalDiagnosticOption, IDictionary`2 specificDiagnosticOptions)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions.FilterDiagnostic(Diagnostic diagnostic)
   at Microsoft.CodeAnalysis.Compilation.FilterAndAppendDiagnostics(DiagnosticBag accumulator, IEnumerable`1 incoming, HashSet`1 exclude)
   at Microsoft.CodeAnalysis.Compilation.FilterAndAppendAndFreeDiagnostics(DiagnosticBag accumulator, DiagnosticBag& incoming)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CompileMethods(CommonPEModuleBuilder moduleBuilder, Boolean emittingPdb, Boolean emitMetadataOnly, Boolean emitTestCoverageData, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream metadataPEStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, CompilationTestData testData, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, IMethodSymbol debugEntryPoint, Stream sourceLinkStream, IEnumerable`1 embeddedTexts, Stream metadataPEStream, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Compilation.Emit(Stream peStream, Stream pdbStream, Stream xmlDocumentationStream, Stream win32Resources, IEnumerable`1 manifestResources, EmitOptions options, CancellationToken cancellationToken)
   at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, ITemplateSource templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Drawing 2 @using System.Globalization 3 @using Page = System.Web.UI.Page 4 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5 6 7 <!DOCTYPE html> 8 <html lang="da"> 9 10 <head> 11 <script src="https://cookiecontrol.bleau.dk/scripts/cookieconsent.js"></script> 12 <script id="cookiecontrolfunctions" src="https://cookiecontrol.bleau.dk/scripts/Cookiecontrolfunctions.js" data-cname="Lemvig" data-defaultset="dwdefault"></script> 13 14 <meta charset="utf-8"> 15 <meta name="viewport" content="width=device-width, initial-scale = 1.0"> 16 <title>@GetValue("Title")</title> 17 @GetValue("MetaTags") 18 @GetValue("CopyRightNotice") 19 20 21 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> 22 <link rel="stylesheet" href="/Files/Templates/Designs/subsite/assets/stylesheets/bleau-styles.min.css" media="screen"> 23 <link rel="stylesheet" href="/Files/Templates/Designs/subsite/assets/stylesheets/slider.css" media="screen"> 24 <link rel="stylesheet" href="/Files/Templates/Designs/subsite/assets/stylesheets/print.min.css" media="print"> 25 <script type="text/javascript" src="/Files/Templates/Designs/subsite/assets/javascripts/svg-inject.min.js"></script> 26 27 28 <!--@Snippet(StyleSheetHead)--> 29 <!--@Snippet(StyleSheet)--> 30 <!--@If Defined(Item.Area.Custom_CSS_Url)--> 31 <link href="<!--@Item.Area.Custom_CSS_Url-->" rel="stylesheet"> 32 <!--@EndIf(Item.Area.Custom_CSS_Url)--> 33 34 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Favicon"))) 35 { 36 <link rel="shortcut icon" href='/Admin/Public/GetImage.ashx?Image=@GetString("Item.Area.Favicon")&amp;Width=16&amp;Height=16&amp;Crop=5&amp;format=png'> 37 } 38 @if (!string.IsNullOrWhiteSpace(GetString("Item.Area.Apple_touch_icon"))) 39 { 40 <link rel="apple-touch-icon image_src" href='/Admin/Public/GetImage.ashx?Image=@GetString("Item.Area.Apple_touch_icon")&amp;Width=16&amp;Height=16&amp;Crop=5&amp;format=png'> 41 } 42 43 44 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 45 46 @{ 47 var primaryColor = Pageview.Area.Item["Primary"].ToString(); 48 if (string.IsNullOrEmpty(primaryColor)) 49 { 50 primaryColor = "#00bfa5"; 51 } 52 var secondaryColor = Pageview.Area.Item["Secondary"].ToString(); 53 if (string.IsNullOrEmpty(secondaryColor)) 54 { 55 secondaryColor = "#00bfa5"; 56 } 57 var MobilMenuColor = Pageview.Area.Item["MobilMenu"].ToString(); 58 if (string.IsNullOrEmpty(secondaryColor)) 59 { 60 MobilMenuColor = "#00bfa5"; 61 } 62 var primaryColorHover = "rgba(7, 39, 92, 0.8)"; 63 var topMenuActive = "#63717e"; 64 var contentLink = "#212121"; 65 var contentLinkActive = "#63717e"; 66 var marinaBlue = "#00609E"; 67 var marinaPurple = "9C1447"; 68 var marinaOrange = "EE7326"; 69 } 70 71 @{ 72 73 74 /* Desktop */ 75 var percent = -20; 76 77 var R = int.Parse(primaryColor.Substring(1, 2), NumberStyles.HexNumber); 78 var G = int.Parse(primaryColor.Substring(3, 2), NumberStyles.HexNumber); 79 var B = int.Parse(primaryColor.Substring(5, 2), NumberStyles.HexNumber); 80 81 R = R * (100 + percent) / 100; 82 G = G * (100 + percent) / 100; 83 B = B * (100 + percent) / 100; 84 85 R = (R < 255) ? R : 255; 86 G = (G < 255) ? G : 255; 87 B = (B < 255) ? B : 255; 88 89 Color myColor = Color.FromArgb(R, G, B); 90 91 string dark = "#" + myColor.R.ToString("X2") + myColor.G.ToString("X2") + myColor.B.ToString("X2"); 92 93 94 /*Mobile*/ 95 var percent2 = -20; 96 97 var R2 = int.Parse(MobilMenuColor.Substring(1, 2), NumberStyles.HexNumber); 98 var G2 = int.Parse(MobilMenuColor.Substring(3, 2), NumberStyles.HexNumber); 99 var B2 = int.Parse(MobilMenuColor.Substring(5, 2), NumberStyles.HexNumber); 100 101 R2 = R2 * (100 + percent2) / 100; 102 G2 = G2 * (100 + percent2) / 100; 103 B2 = B2 * (100 + percent2) / 100; 104 105 R2 = (R2 < 255) ? R2 : 255; 106 G2 = (G2 < 255) ? G2 : 255; 107 B2 = (B2 < 255) ? B2 : 255; 108 109 Color myMobileColor = Color.FromArgb(R2, G2, B2); 110 111 string Mobiledark = "#" + myMobileColor.R.ToString("X2") + myMobileColor.G.ToString("X2") + myMobileColor.B.ToString("X2"); 112 113 var percent3 = -40; 114 115 var R3 = int.Parse(MobilMenuColor.Substring(1, 2), NumberStyles.HexNumber); 116 var G3 = int.Parse(MobilMenuColor.Substring(3, 2), NumberStyles.HexNumber); 117 var B3 = int.Parse(MobilMenuColor.Substring(5, 2), NumberStyles.HexNumber); 118 119 R3 = R3 * (100 + percent3) / 100; 120 G3 = G3 * (100 + percent3) / 100; 121 B3 = B3 * (100 + percent3) / 100; 122 123 R3 = (R3 < 255) ? R3 : 255; 124 G3 = (G3 < 255) ? G3 : 255; 125 B3 = (B3 < 255) ? B3 : 255; 126 127 Color myMobileColor2 = Color.FromArgb(R3, G3, B3); 128 129 string Mobiledarker = "#" + myMobileColor2.R.ToString("X2") + myMobileColor2.G.ToString("X2") + myMobileColor2.B.ToString("X2"); 130 131 } 132 133 <style> 134 /*Site colors*/ 135 136 .subpage .submenu ul li:active, 137 .subpage .submenu ul li:focus, 138 .subpage .submenu ul li.active, 139 .subpage .submenu ul li a:hover, 140 .subpage .submenu ul li.inpath.active a.active, 141 .subpage .submenu ul li.inpath.has-sub:hover, 142 .subpage .submenu ul li.inpath.has-sub.active, 143 .subpage .submenu ul li.has-sub ul li:hover 144 { 145 background: @secondaryColor; 146 } 147 148 .subpage .submenu ul li a:hover::after, 149 .subpage .submenu ul li:active:after, 150 .subpage .submenu ul li:focus:after, 151 .subpage .submenu ul li:active:after, 152 .subpage .submenu ul li.active:after, 153 .subpage .submenu ul li.has-sub ul li:hover:after, 154 .subpage .submenu ul li.inpath.active:after, 155 .subpage .submenu ul li.has-sub ul li.active:after 156 { 157 border-left: 10px solid @secondaryColor; 158 } 159 160 .subpage .submenu ul li.has-sub ul, .subpage .submenu ul li.has-sub ul li 161 { 162 background-color: @primaryColor; 163 } 164 .items-frontpage .frontpage-item #item-slider .carousel-caption, 165 header nav ul li a:hover, 166 header nav ul li a .L1_Active, 167 header nav ul li a.L1_Active 168 { 169 color: @primaryColor; 170 } 171 172 173 .download-btn { 174 color: @primaryColor; 175 border-color: @primaryColor; 176 } 177 .download-btn:hover { 178 color: @primaryColor; 179 border-color: @primaryColor; 180 } 181 182 .green-box 183 { 184 background: @primaryColor; 185 } 186 187 .accordeon-list .panel-group .panel.panel-default .panel-title a.collapsed:after, 188 .accordeon-list .panel-group .panel.panel-default .panel-title a:after, 189 .accordeon-list .panel-group .panel.panel-default .panel-heading, 190 .accordeon-list .panel-group .panel.panel-default .panel-heading:last-child, 191 .accordeon-list .panel-group .panel.panel-default:last-child .panel-heading .panel-title a.collapsed, 192 .accordeon-list .panel-group .panel.panel-default .panel-title a.collapsed:hover 193 { 194 border-color: @primaryColor !important; 195 196 } 197 198 footer .footer-address .address-item a:hover { 199 color: @primaryColor; 200 } 201 202 .subpage .indhold-content .paragraph a:hover { 203 color: @primaryColor; 204 } 205 206 .subpagecontent p a { 207 color: @contentLink; 208 } 209 .subpagecontent p a:hover { 210 color: @contentLinkActive; 211 } 212 213 header nav ul li a:hover, header nav ul li a:focus, header nav ul li a.L1_Active { 214 color: @secondaryColor; 215 } 216 a.download-btn:hover, a.download-btn:focus{ 217 outline: 1px solid @primaryColor; 218 outline-offset: -5px; 219 text-decoration:underline; 220 } 221 222 /*Mobilmenu*/ 223 224 #expand-left, 225 #mobile-menu { 226 background: @MobilMenuColor; 227 } 228 #mobile-menu>li{ 229 border-bottom: 1px solid @Mobiledark; 230 } 231 #mobile-menu>li.has-sub:before, 232 #mobile-menu>li.active, 233 #mobile-menu ul.sub-menu li.active, 234 #mobile-menu ul.sub-menu li.has-sub:before{ 235 background: @Mobiledark; 236 } 237 #mobile-menu>li.has-sub.active:before, 238 #mobile-menu ul.sub-menu li.active:before{ 239 background: @Mobiledarker; 240 } 241 #mobile-menu ul.sub-menu li { 242 background: @MobilMenuColor; 243 border-bottom: 1px solid @Mobiledarker; 244 } 245 246 247 </style> 248 249 @GetValue("Stylesheets") 250 @GetValue("Javascripts") 251 </head> 252 253 <body class="<!--@If(Global:Page.Top.Name<contains>'forside')-->frontpage<!--@EndIf--><!--@If Defined(Item.Area.Color)--> <!--@Item.Area.Color--><!--@EndIf-->"> 254 255 <div class="body-wrapper"> 256 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 257 258 <header class=""> 259 <a class="skip-main" aria-label="Hovedindhold" href="#maincontent">Skip til hoved indholdet</a> 260 <div class="navbar container hidden-print" role="navigation"> 261 262 <div class="top-nav" id="nav-wrapper"> 263 264 <div class="navbar-header col-xs-12 col-sm-2"> 265 <a href="javascript:void(0);" class="menu-icon navbar-toggle" title="mobile-menu" aria-label="Hovedmenu til mobile enheder"> </a> 266 <div id="expand-left"> 267 @GetValue("DwNavigation(mobilemenu)") 268 </div> 269 @{ 270 var title = GetString("DwAreaName"); 271 var areaID = GetString("DwAreaID"); 272 var hideTitle = GetBoolean("Item.Area.HideTextByLogo"); 273 var pageLogo = GetString("Item.Page.PageLogo"); 274 var imageLogo = !string.IsNullOrEmpty(pageLogo) ? GetString("Item.Page.PageLogo") : GetString("Item.Area.Logo_Image"); 275 276 <a class="navbar-brand" href="/" title="@title"> 277 <h1 class="sr-only">@title</h1> 278 279 @if (!string.IsNullOrWhiteSpace(imageLogo)) 280 { 281 <img src="@imageLogo" alt="@title logo grafik"> 282 } 283 284 @if(!@hideTitle){ 285 <span class="logo-title">@title</span> 286 287 } 288 </a> 289 } 290 </div> 291 <nav class="hidden-print col-sm-10 hidden-xs" aria-label="Hoved menu"> 292 @GetValue("DwNavigation(menu)") 293 </nav><!-- /.nav-collapse --> 294 295 </div><!-- /.container --> 296 </div><!-- /.navbar --> 297 </header> 298 299 <div class="container indhold" role="main" id="Hovedindhold"> 300 301 302 <div class="subpage clearfix"> 303 <div class="row"> 304 <div id="equalheight"> 305 <div class="col-sm-3 col-md-3 submenu" style="background-color: @primaryColor"> 306 @GetValue("DwNavigation(submenu)") 307 </div> 308 <div class="col-sm-9 col-md-9 indhold-content" id="maincontent"> 309 <div class="col-md-1 hidden-xs"></div> 310 <div class="col-md-8 subpagecontent"> 311 @if (GetString("Item.SystemName") == "News_Item") 312 { 313 <div class="paragraph"> 314 <h3>@GetString("Item.PageName")</h3> 315 316 @if (!string.IsNullOrEmpty(GetString("Item.Image"))) 317 { 318 var image = GetString("Item.Image"); 319 <img src="/Admin/Public/GetImage.ashx?Image=@image&amp;Width=500&amp;Crop=5" alt='@GetString("Item.Alttekst")'> 320 } 321 322 @if (!string.IsNullOrEmpty(GetString("Item.Text"))) 323 { 324 @GetString("Item.Text") 325 } 326 327 @if (!string.IsNullOrWhiteSpace(GetString("Item.Read_More"))) 328 { 329 <a href='@GetValue("Item.Read_More")' aria-label='Læs mere om: @GetString("Item.PageName")'>Læs mere</a> 330 } 331 </div> 332 } 333 @GetValue("DwContent(maincontent)") 334 </div> 335 </div> 336 </div> 337 </div> 338 </div> 339 340 </div> 341 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 342 343 @{ 344 char[] delimiters = { ',' }; 345 var footerinfo = GetString("Item.Area.FooterInfo").Split(delimiters); 346 var footerEmail = @GetString("Item.Area.FooterEmail"); 347 var email_link = "mailto:" + @GetString("Item.Area.FooterEmail"); 348 var Footerlogo = GetString("Item.Area.FooterLogo"); 349 var Website = GetString("Item.Area.Website"); 350 var Col1 = "col-xs-12 col-sm-4 col-md-4 pull-right"; 351 var Col2 = "col-xs-12 col-sm-4 col-md-2 pull-right"; 352 var Col3 = "col-xs-12 col-sm-4 col-md-6 pull-right"; 353 } 354 355 <footer> 356 <div class="footer-container container"> 357 @if (!string.IsNullOrWhiteSpace(Footerlogo)) 358 { 359 <div class="footer-address col-xs-12 @Col2"> 360 @if (!string.IsNullOrWhiteSpace(Website)) 361 { 362 <a href='//@GetString("Item.Area.Website")' target="_blank"><img src='@GetString("Item.Area.FooterLogo")' class="FooterLogo" alt='@GetString("Item.Area.FooterAlt")'></a> 363 } 364 else{ 365 <img src='@GetString("Item.Area.FooterLogo")' class="FooterLogo" alt=""> 366 } 367 </div> 368 } 369 <div class="footer-address @Col1"> 370 <h3>@GetString("Item.Area.FooterHeader")</h3> 371 @foreach (string a in footerinfo) 372 { 373 <div class="address-item">@a</div> 374 } 375 376 <div class="address-item"> 377 @if (!string.IsNullOrWhiteSpace(footerEmail)) 378 {<a href="@email_link">@GetString("Item.Area.FooterEmail")</a>} 379 @if (!string.IsNullOrWhiteSpace(Website)) 380 {<a href='//@GetString("Item.Area.Website")' target="_blank">@GetString("Item.Area.Website")</a>} 381 </div> 382 383 </div> 384 385 <div class="footer-address @Col3"> 386 <br> 387 @if (!string.IsNullOrEmpty(@GetString("Item.Area.WAS_link"))) 388 { 389 <a style="font-size:14px;" href='@GetString("Item.Area.WAS_link")' target="_blank">Tilgængelighedserklæring</a> 390 } 391 </div> 392 </div> 393 </footer> 394 395 </div> 396 397 <div class="bgr-opacity"></div> 398 <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> 399 <script type="text/javascript" src="/Files/Templates/Designs/subsite/assets/vendor/bootstrap/js/bootstrap.min.js"></script> 400 <script type="text/javascript" src="/Files/Templates/Designs/subsite/assets/javascripts/main.js"></script> 401 <!--@If(0=1)--> 402 <!-- http://www.1stwebdesigner.com/design/snippets-html5-boilerplate/#highlighter_966946 --> 403 <!--@EndIf--> 404 <!--@If Defined(Item.Area.Google_Analytics_ID)--> 405 <script> 406 var _gaq = [['_setAccount', '<!--@Item.Area.Google_Analytics_ID-->'], ['_trackPageview']]; 407 (function(d, t) { 408 var g = d.createElement(t), 409 s = d.getElementsByTagName(t)[0]; 410 g.async = true; 411 g.src = '//www.google-analytics.com/ga.js'; 412 s.parentNode.insertBefore(g, s); 413 })(document, 'script'); 414 </script> 415 <!--@EndIf(Item.Area.Google_Analytics_ID)--> 416 417 <!--@Snippet(JavaScriptBottom)--> 418 </body> 419 </html> 420