|
3 | 3 | using System.Configuration; |
4 | 4 | using System.IO; |
5 | 5 | using System.Linq; |
| 6 | +using System.Threading; |
6 | 7 | using ServiceStack.Common; |
7 | 8 | using ServiceStack.Html; |
8 | 9 | using ServiceStack.Logging; |
@@ -48,19 +49,15 @@ public static bool IsRegistered |
48 | 49 | public static string TemplatePlaceHolder = "@RenderBody()"; |
49 | 50 |
|
50 | 51 | // ~/View - Dynamic Pages |
51 | | - public Dictionary<string, ViewPageRef> ViewPages = new Dictionary<string, ViewPageRef>( |
52 | | - StringComparer.CurrentCultureIgnoreCase); |
| 52 | + public Dictionary<string, ViewPageRef> ViewPages; |
53 | 53 |
|
54 | 54 | // ~/View/Shared - Dynamic Shared Pages |
55 | | - public Dictionary<string, ViewPageRef> ViewSharedPages = new Dictionary<string, ViewPageRef>( |
56 | | - StringComparer.CurrentCultureIgnoreCase); |
| 55 | + public Dictionary<string, ViewPageRef> ViewSharedPages; |
57 | 56 |
|
58 | 57 | //Content Pages outside of ~/View |
59 | | - public Dictionary<string, ViewPageRef> ContentPages = new Dictionary<string, ViewPageRef>( |
60 | | - StringComparer.CurrentCultureIgnoreCase); |
| 58 | + public Dictionary<string, ViewPageRef> ContentPages; |
61 | 59 |
|
62 | | - public Dictionary<string, ViewPageRef> MasterPageTemplates = new Dictionary<string, ViewPageRef>( |
63 | | - StringComparer.CurrentCultureIgnoreCase); |
| 60 | + public Dictionary<string, ViewPageRef> MasterPageTemplates; |
64 | 61 |
|
65 | 62 | public IAppHost AppHost { get; set; } |
66 | 63 |
|
@@ -260,6 +257,13 @@ public string RenderPartial(string pageName, object model, bool renderHtml, IHtt |
260 | 257 |
|
261 | 258 | public void Init() |
262 | 259 | { |
| 260 | + ViewPages = new Dictionary<string, ViewPageRef>(StringComparer.CurrentCultureIgnoreCase); |
| 261 | + // ~/View/Shared - Dynamic Shared Pages |
| 262 | + ViewSharedPages = new Dictionary<string, ViewPageRef>(StringComparer.CurrentCultureIgnoreCase); |
| 263 | + //Content Pages outside of ~/View |
| 264 | + ContentPages = new Dictionary<string, ViewPageRef>(StringComparer.CurrentCultureIgnoreCase); |
| 265 | + MasterPageTemplates = new Dictionary<string, ViewPageRef>(StringComparer.CurrentCultureIgnoreCase); |
| 266 | + |
263 | 267 | //Force Binder to load |
264 | 268 | var loaded = typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly != null; |
265 | 269 | if (!loaded) |
|
0 commit comments