-
Notifications
You must be signed in to change notification settings - Fork 0
/
T4MVC.cs
802 lines (648 loc) · 44.6 KB
/
T4MVC.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
// <auto-generated />
// This file was generated by a T4 template.
// Don't change it directly as your change would get overwritten. Instead, make changes
// to the .tt file (i.e. the T4 template) and save it to regenerate this file.
// Make sure the compiler doesn't complain about missing Xml comments
#pragma warning disable 1591
#region T4MVC
using System;
using System.Diagnostics;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Web;
using System.Web.Hosting;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using T4MVC;
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class MVC {
static readonly MusicClass s_Music = new MusicClass();
public static MusicClass Music { get { return s_Music; } }
public static Website.Controllers.Blogs.BlogController Blog = new Website.Controllers.Blogs.T4MVC_BlogController();
public static Website.Controllers.Blogs.PostController Post = new Website.Controllers.Blogs.T4MVC_PostController();
public static Website.Controllers.HomeController Home = new Website.Controllers.T4MVC_HomeController();
public static T4MVC.SharedController Shared = new T4MVC.SharedController();
}
namespace T4MVC {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class MusicClass {
public readonly string Name = "Music";
public Website.Areas.Music.Controllers.HomeController Home = new Website.Areas.Music.Controllers.T4MVC_HomeController();
public T4MVC.Music.SharedController Shared = new T4MVC.Music.SharedController();
}
}
namespace System.Web.Mvc {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class T4Extensions {
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result) {
return htmlHelper.RouteLink(linkText, result.GetRouteValueDictionary());
}
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result, object htmlAttributes) {
return ActionLink(htmlHelper, linkText, result, new RouteValueDictionary(htmlAttributes));
}
public static MvcHtmlString ActionLink(this HtmlHelper htmlHelper, string linkText, ActionResult result, IDictionary<string, object> htmlAttributes) {
return htmlHelper.RouteLink(linkText, result.GetRouteValueDictionary(), htmlAttributes);
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result, FormMethod formMethod) {
return htmlHelper.BeginForm(result, formMethod, null);
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result, FormMethod formMethod, object htmlAttributes) {
return BeginForm(htmlHelper, result, formMethod, new RouteValueDictionary(htmlAttributes));
}
public static MvcForm BeginForm(this HtmlHelper htmlHelper, ActionResult result, FormMethod formMethod, IDictionary<string, object> htmlAttributes) {
var callInfo = result.GetT4MVCResult();
return htmlHelper.BeginForm(callInfo.Action, callInfo.Controller, callInfo.RouteValueDictionary, formMethod, htmlAttributes);
}
public static void RenderAction(this HtmlHelper htmlHelper, ActionResult result) {
var callInfo = result.GetT4MVCResult();
htmlHelper.RenderAction(callInfo.Action, callInfo.Controller, callInfo.RouteValueDictionary);
}
public static MvcHtmlString Action(this HtmlHelper htmlHelper, ActionResult result) {
var callInfo = result.GetT4MVCResult();
return htmlHelper.Action(callInfo.Action, callInfo.Controller, callInfo.RouteValueDictionary);
}
public static string Action(this UrlHelper urlHelper, ActionResult result) {
return urlHelper.RouteUrl(result.GetRouteValueDictionary());
}
public static string ActionAbsolute(this UrlHelper urlHelper, ActionResult result) {
return string.Format("{0}{1}",urlHelper.RequestContext.HttpContext.Request.Url.GetLeftPart(UriPartial.Authority),
urlHelper.RouteUrl(result.GetRouteValueDictionary()));
}
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, ActionResult result, AjaxOptions ajaxOptions) {
return ajaxHelper.RouteLink(linkText, result.GetRouteValueDictionary(), ajaxOptions);
}
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, ActionResult result, AjaxOptions ajaxOptions, object htmlAttributes) {
return ajaxHelper.RouteLink(linkText, result.GetRouteValueDictionary(), ajaxOptions, new RouteValueDictionary(htmlAttributes));
}
public static MvcHtmlString ActionLink(this AjaxHelper ajaxHelper, string linkText, ActionResult result, AjaxOptions ajaxOptions, IDictionary<string, object> htmlAttributes) {
return ajaxHelper.RouteLink(linkText, result.GetRouteValueDictionary(), ajaxOptions, htmlAttributes);
}
public static Route MapRoute(this RouteCollection routes, string name, string url, ActionResult result) {
return MapRoute(routes, name, url, result, null /*namespaces*/);
}
public static Route MapRoute(this RouteCollection routes, string name, string url, ActionResult result, object defaults) {
return MapRoute(routes, name, url, result, defaults, null /*constraints*/, null /*namespaces*/);
}
public static Route MapRoute(this RouteCollection routes, string name, string url, ActionResult result, string[] namespaces) {
return MapRoute(routes, name, url, result, null /*defaults*/, namespaces);
}
public static Route MapRoute(this RouteCollection routes, string name, string url, ActionResult result, object defaults, object constraints) {
return MapRoute(routes, name, url, result, defaults, constraints, null /*namespaces*/);
}
public static Route MapRoute(this RouteCollection routes, string name, string url, ActionResult result, object defaults, string[] namespaces) {
return MapRoute(routes, name, url, result, defaults, null /*constraints*/, namespaces);
}
public static Route MapRoute(this RouteCollection routes, string name, string url, ActionResult result, object defaults, object constraints, string[] namespaces) {
// Create and add the route
var route = CreateRoute(url, result, defaults, constraints, namespaces);
routes.Add(name, route);
return route;
}
// Note: can't name the AreaRegistrationContext methods 'MapRoute', as that conflicts with the existing methods
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, ActionResult result) {
return MapRouteArea(context, name, url, result, null /*namespaces*/);
}
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, ActionResult result, object defaults) {
return MapRouteArea(context, name, url, result, defaults, null /*constraints*/, null /*namespaces*/);
}
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, ActionResult result, string[] namespaces) {
return MapRouteArea(context, name, url, result, null /*defaults*/, namespaces);
}
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, ActionResult result, object defaults, object constraints) {
return MapRouteArea(context, name, url, result, defaults, constraints, null /*namespaces*/);
}
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, ActionResult result, object defaults, string[] namespaces) {
return MapRouteArea(context, name, url, result, defaults, null /*constraints*/, namespaces);
}
public static Route MapRouteArea(this AreaRegistrationContext context, string name, string url, ActionResult result, object defaults, object constraints, string[] namespaces) {
// Create and add the route
var route = CreateRoute(url, result, defaults, constraints, namespaces);
context.Routes.Add(name, route);
route.DataTokens["area"] = context.AreaName;
return route;
}
private static Route CreateRoute(string url, ActionResult result, object defaults, object constraints, string[] namespaces) {
// Start by adding the default values from the anonymous object (if any)
var routeValues = new RouteValueDictionary(defaults);
// Then add the Controller/Action names and the parameters from the call
foreach (var pair in result.GetRouteValueDictionary()) {
routeValues.Add(pair.Key, pair.Value);
}
var routeConstraints = new RouteValueDictionary(constraints);
// Create and add the route
var route = new Route(url, routeValues, routeConstraints, new MvcRouteHandler());
route.DataTokens = new RouteValueDictionary();
if (namespaces != null && namespaces.Length > 0) {
route.DataTokens["Namespaces"] = namespaces;
}
return route;
}
public static IT4MVCActionResult GetT4MVCResult(this ActionResult result) {
var t4MVCResult = result as IT4MVCActionResult;
if (t4MVCResult == null) {
throw new InvalidOperationException("T4MVC was called incorrectly. You may need to force it to regenerate by right clicking on T4MVC.tt and choosing Run Custom Tool");
}
return t4MVCResult;
}
public static RouteValueDictionary GetRouteValueDictionary(this ActionResult result) {
return result.GetT4MVCResult().RouteValueDictionary;
}
public static ActionResult AddRouteValues(this ActionResult result, object routeValues) {
return result.AddRouteValues(new RouteValueDictionary(routeValues));
}
public static ActionResult AddRouteValues(this ActionResult result, RouteValueDictionary routeValues) {
RouteValueDictionary currentRouteValues = result.GetRouteValueDictionary();
// Add all the extra values
foreach (var pair in routeValues) {
currentRouteValues.Add(pair.Key, pair.Value);
}
return result;
}
public static ActionResult AddRouteValues(this ActionResult result, System.Collections.Specialized.NameValueCollection nameValueCollection) {
// Copy all the values from the NameValueCollection into the route dictionary
nameValueCollection.CopyTo(result.GetRouteValueDictionary());
return result;
}
public static ActionResult AddRouteValue(this ActionResult result, string name, object value) {
RouteValueDictionary routeValues = result.GetRouteValueDictionary();
routeValues.Add(name, value);
return result;
}
public static void InitMVCT4Result(this IT4MVCActionResult result, string area, string controller, string action) {
result.Controller = controller;
result.Action = action;
result.RouteValueDictionary = new RouteValueDictionary();
result.RouteValueDictionary.Add("Area", area ?? "");
result.RouteValueDictionary.Add("Controller", controller);
result.RouteValueDictionary.Add("Action", action);
}
public static bool FileExists(string virtualPath) {
if (!HostingEnvironment.IsHosted) return false;
string filePath = HostingEnvironment.MapPath(virtualPath);
return System.IO.File.Exists(filePath);
}
static DateTime CenturyBegin=new DateTime(2001,1,1);
public static string TimestampString(string virtualPath) {
if (!HostingEnvironment.IsHosted) return string.Empty;
string filePath = HostingEnvironment.MapPath(virtualPath);
return Convert.ToString((System.IO.File.GetLastWriteTimeUtc(filePath).Ticks-CenturyBegin.Ticks)/1000000000,16);
}
}
}
[GeneratedCode("T4MVC", "2.0")]
public interface IT4MVCActionResult {
string Action { get; set; }
string Controller { get; set; }
RouteValueDictionary RouteValueDictionary { get; set; }
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class T4MVC_ActionResult : System.Web.Mvc.ActionResult, IT4MVCActionResult {
public T4MVC_ActionResult(string area, string controller, string action): base() {
this.InitMVCT4Result(area, controller, action);
}
public override void ExecuteResult(System.Web.Mvc.ControllerContext context) { }
public string Controller { get; set; }
public string Action { get; set; }
public RouteValueDictionary RouteValueDictionary { get; set; }
}
namespace Links {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class Scripts {
private const string URLPATH = "~/Scripts";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class javascript {
private const string URLPATH = "~/Scripts/javascript";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class lib {
private const string URLPATH = "~/Scripts/javascript/lib";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string dd_belatedpng_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/dd_belatedpng.min.js") ? Url("dd_belatedpng.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/dd_belatedpng.js") : Url("dd_belatedpng.js")+"?"+T4Extensions.TimestampString(URLPATH + "/dd_belatedpng.js");
public static readonly string Jplayer_swf = Url("Jplayer.swf")+"?"+T4Extensions.TimestampString(URLPATH + "/Jplayer.swf");
public static readonly string jquery_1_4_4_vsdoc_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery-1.4.4-vsdoc.min.js") ? Url("jquery-1.4.4-vsdoc.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery-1.4.4-vsdoc.js") : Url("jquery-1.4.4-vsdoc.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery-1.4.4-vsdoc.js");
public static readonly string jquery_1_4_4_min_js = Url("jquery-1.4.4.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery-1.4.4.min.js");
public static readonly string jquery_jplayer_min_js = Url("jquery.jplayer.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.jplayer.min.js");
public static readonly string jquery_unobtrusive_ajax_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.unobtrusive-ajax.min.js") ? Url("jquery.unobtrusive-ajax.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.unobtrusive-ajax.js") : Url("jquery.unobtrusive-ajax.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.unobtrusive-ajax.js");
public static readonly string jquery_unobtrusive_ajax_min_js = Url("jquery.unobtrusive-ajax.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.unobtrusive-ajax.min.js");
public static readonly string jquery_validate_vsdoc_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.validate-vsdoc.min.js") ? Url("jquery.validate-vsdoc.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate-vsdoc.js") : Url("jquery.validate-vsdoc.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate-vsdoc.js");
public static readonly string jquery_validate_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.validate.min.js") ? Url("jquery.validate.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate.js") : Url("jquery.validate.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate.js");
public static readonly string jquery_validate_min_js = Url("jquery.validate.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate.min.js");
public static readonly string jquery_validate_unobtrusive_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery.validate.unobtrusive.min.js") ? Url("jquery.validate.unobtrusive.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate.unobtrusive.js") : Url("jquery.validate.unobtrusive.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate.unobtrusive.js");
public static readonly string jquery_validate_unobtrusive_min_js = Url("jquery.validate.unobtrusive.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/jquery.validate.unobtrusive.min.js");
public static readonly string MicrosoftAjax_debug_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/MicrosoftAjax.debug.min.js") ? Url("MicrosoftAjax.debug.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftAjax.debug.js") : Url("MicrosoftAjax.debug.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftAjax.debug.js");
public static readonly string MicrosoftAjax_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/MicrosoftAjax.min.js") ? Url("MicrosoftAjax.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftAjax.js") : Url("MicrosoftAjax.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftAjax.js");
public static readonly string MicrosoftMvcAjax_debug_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/MicrosoftMvcAjax.debug.min.js") ? Url("MicrosoftMvcAjax.debug.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcAjax.debug.js") : Url("MicrosoftMvcAjax.debug.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcAjax.debug.js");
public static readonly string MicrosoftMvcAjax_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/MicrosoftMvcAjax.min.js") ? Url("MicrosoftMvcAjax.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcAjax.js") : Url("MicrosoftMvcAjax.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcAjax.js");
public static readonly string MicrosoftMvcValidation_debug_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/MicrosoftMvcValidation.debug.min.js") ? Url("MicrosoftMvcValidation.debug.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcValidation.debug.js") : Url("MicrosoftMvcValidation.debug.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcValidation.debug.js");
public static readonly string MicrosoftMvcValidation_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/MicrosoftMvcValidation.min.js") ? Url("MicrosoftMvcValidation.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcValidation.js") : Url("MicrosoftMvcValidation.js")+"?"+T4Extensions.TimestampString(URLPATH + "/MicrosoftMvcValidation.js");
public static readonly string modernizr_1_6_min_js = Url("modernizr-1.6.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/modernizr-1.6.min.js");
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class media {
private const string URLPATH = "~/Scripts/javascript/media";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string soundplayer_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/soundplayer.min.js") ? Url("soundplayer.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/soundplayer.js") : Url("soundplayer.js")+"?"+T4Extensions.TimestampString(URLPATH + "/soundplayer.js");
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class profiling {
private const string URLPATH = "~/Scripts/javascript/profiling";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string charts_swf = Url("charts.swf")+"?"+T4Extensions.TimestampString(URLPATH + "/charts.swf");
public static readonly string config_js = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/config.min.js") ? Url("config.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/config.js") : Url("config.js")+"?"+T4Extensions.TimestampString(URLPATH + "/config.js");
public static readonly string yahoo_profiling_css = Url("yahoo-profiling.css")+"?"+T4Extensions.TimestampString(URLPATH + "/yahoo-profiling.css");
public static readonly string yahoo_profiling_min_js = Url("yahoo-profiling.min.js")+"?"+T4Extensions.TimestampString(URLPATH + "/yahoo-profiling.min.js");
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class swf {
private const string URLPATH = "~/Scripts/swf";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class lib {
private const string URLPATH = "~/Scripts/swf/lib";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
}
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class Content {
private const string URLPATH = "~/Content";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class css {
private const string URLPATH = "~/Content/css";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string css_chirp_config = Url("css.chirp.config")+"?"+T4Extensions.TimestampString(URLPATH + "/css.chirp.config");
public static readonly string main_css = Url("main.css")+"?"+T4Extensions.TimestampString(URLPATH + "/main.css");
public static readonly string handheld_css = Url("handheld.css")+"?"+T4Extensions.TimestampString(URLPATH + "/handheld.css");
public static readonly string media_css = Url("media.css")+"?"+T4Extensions.TimestampString(URLPATH + "/media.css");
public static readonly string style_hybrid_less = Url("style.hybrid.less")+"?"+T4Extensions.TimestampString(URLPATH + "/style.hybrid.less");
public static readonly string style_css = Url("style.css")+"?"+T4Extensions.TimestampString(URLPATH + "/style.css");
public static readonly string style_min_css = Url("style.min.css")+"?"+T4Extensions.TimestampString(URLPATH + "/style.min.css");
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class fonts {
private const string URLPATH = "~/Content/fonts";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string house_whiteboard_font_by_callsignkatejones_webfont_eot = Url("house_whiteboard_font_by_callsignkatejones-webfont.eot")+"?"+T4Extensions.TimestampString(URLPATH + "/house_whiteboard_font_by_callsignkatejones-webfont.eot");
public static readonly string house_whiteboard_font_by_callsignkatejones_webfont_svg = Url("house_whiteboard_font_by_callsignkatejones-webfont.svg")+"?"+T4Extensions.TimestampString(URLPATH + "/house_whiteboard_font_by_callsignkatejones-webfont.svg");
public static readonly string house_whiteboard_font_by_callsignkatejones_webfont_ttf = Url("house_whiteboard_font_by_callsignkatejones-webfont.ttf")+"?"+T4Extensions.TimestampString(URLPATH + "/house_whiteboard_font_by_callsignkatejones-webfont.ttf");
public static readonly string house_whiteboard_font_by_callsignkatejones_webfont_woff = Url("house_whiteboard_font_by_callsignkatejones-webfont.woff")+"?"+T4Extensions.TimestampString(URLPATH + "/house_whiteboard_font_by_callsignkatejones-webfont.woff");
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class images {
private const string URLPATH = "~/Content/images";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string apple_touch_icon_png = Url("apple-touch-icon.png")+"?"+T4Extensions.TimestampString(URLPATH + "/apple-touch-icon.png");
public static readonly string favicon_ico = Url("favicon.ico")+"?"+T4Extensions.TimestampString(URLPATH + "/favicon.ico");
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class icons {
private const string URLPATH = "~/Content/images/icons";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string bullet_arrow_down_png = Url("bullet_arrow_down.png")+"?"+T4Extensions.TimestampString(URLPATH + "/bullet_arrow_down.png");
public static readonly string bullet_arrow_right_png = Url("bullet_arrow_right.png")+"?"+T4Extensions.TimestampString(URLPATH + "/bullet_arrow_right.png");
public static readonly string control_end_png = Url("control_end.png")+"?"+T4Extensions.TimestampString(URLPATH + "/control_end.png");
public static readonly string control_pause_png = Url("control_pause.png")+"?"+T4Extensions.TimestampString(URLPATH + "/control_pause.png");
public static readonly string control_play_png = Url("control_play.png")+"?"+T4Extensions.TimestampString(URLPATH + "/control_play.png");
public static readonly string control_start_png = Url("control_start.png")+"?"+T4Extensions.TimestampString(URLPATH + "/control_start.png");
public static readonly string control_stop_png = Url("control_stop.png")+"?"+T4Extensions.TimestampString(URLPATH + "/control_stop.png");
public static readonly string sound_png = Url("sound.png")+"?"+T4Extensions.TimestampString(URLPATH + "/sound.png");
public static readonly string sound_low_png = Url("sound_low.png")+"?"+T4Extensions.TimestampString(URLPATH + "/sound_low.png");
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public static class sounds {
private const string URLPATH = "~/Content/sounds";
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
public static readonly string Daft_Punk___Derezzed_mp3 = Url("Daft Punk - Derezzed.mp3")+"?"+T4Extensions.TimestampString(URLPATH + "/Daft Punk - Derezzed.mp3");
}
}
}
static class T4MVCHelpers {
// You can change the ProcessVirtualPath method to modify the path that gets returned to the client.
// e.g. you can prepend a domain, or append a query string:
// return "http://localhost" + path + "?foo=bar";
private static string ProcessVirtualPathDefault(string virtualPath) {
// The path that comes in starts with ~/ and must first be made absolute
string path = VirtualPathUtility.ToAbsolute(virtualPath);
// Add your own modifications here before returning the path
return path;
}
// Calling ProcessVirtualPath through delegate to allow it to be replaced for unit testing
public static Func<string, string> ProcessVirtualPath = ProcessVirtualPathDefault;
// Logic to determine if the app is running in production or dev environment
public static bool IsProduction() {
return (HttpContext.Current != null && !HttpContext.Current.IsDebuggingEnabled);
}
}
namespace Website.Controllers.Blogs {
public partial class BlogController {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public BlogController() { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected BlogController(Dummy d) { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(ActionResult result) {
var callInfo = result.GetT4MVCResult();
return RedirectToRoute(callInfo.RouteValueDictionary);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Index() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Index);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Tag() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Tag);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public BlogController Actions { get { return MVC.Blog; } }
[GeneratedCode("T4MVC", "2.0")]
public readonly string Area = "";
[GeneratedCode("T4MVC", "2.0")]
public readonly string Name = "Blog";
static readonly ActionNamesClass s_actions = new ActionNamesClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionNamesClass ActionNames { get { return s_actions; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionNamesClass {
public readonly string Index = "Index";
public readonly string Tag = "Tag";
}
static readonly ViewNames s_views = new ViewNames();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewNames Views { get { return s_views; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ViewNames {
public readonly string Index = "~/Views/Blog/Index.cshtml";
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class T4MVC_BlogController: Website.Controllers.Blogs.BlogController {
public T4MVC_BlogController() : base(Dummy.Instance) { }
public override System.Web.Mvc.ActionResult Index(string blogName) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Index);
callInfo.RouteValueDictionary.Add("blogName", blogName);
return callInfo;
}
public override System.Web.Mvc.ActionResult Tag(string blogName, string tag) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Tag);
callInfo.RouteValueDictionary.Add("blogName", blogName);
callInfo.RouteValueDictionary.Add("tag", tag);
return callInfo;
}
}
}
namespace Website.Controllers.Blogs {
public partial class PostController {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public PostController() { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected PostController(Dummy d) { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(ActionResult result) {
var callInfo = result.GetT4MVCResult();
return RedirectToRoute(callInfo.RouteValueDictionary);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Details() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Details);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Edit() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Edit);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Delete() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Delete);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public PostController Actions { get { return MVC.Post; } }
[GeneratedCode("T4MVC", "2.0")]
public readonly string Area = "";
[GeneratedCode("T4MVC", "2.0")]
public readonly string Name = "Post";
static readonly ActionNamesClass s_actions = new ActionNamesClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionNamesClass ActionNames { get { return s_actions; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionNamesClass {
public readonly string Index = "Index";
public readonly string Details = "Details";
public readonly string Create = "Create";
public readonly string Edit = "Edit";
public readonly string Delete = "Delete";
}
static readonly ViewNames s_views = new ViewNames();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewNames Views { get { return s_views; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ViewNames {
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class T4MVC_PostController: Website.Controllers.Blogs.PostController {
public T4MVC_PostController() : base(Dummy.Instance) { }
public override System.Web.Mvc.ActionResult Index() {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Index);
return callInfo;
}
public override System.Web.Mvc.ActionResult Details(int id) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Details);
callInfo.RouteValueDictionary.Add("id", id);
return callInfo;
}
public override System.Web.Mvc.ActionResult Create() {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Create);
return callInfo;
}
public override System.Web.Mvc.ActionResult Create(Website.Models.Blog.Post p) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Create);
callInfo.RouteValueDictionary.Add("p", p);
return callInfo;
}
public override System.Web.Mvc.ActionResult Edit(int id) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Edit);
callInfo.RouteValueDictionary.Add("id", id);
return callInfo;
}
public override System.Web.Mvc.ActionResult Edit(int id, Website.Models.Blog.Post p) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Edit);
callInfo.RouteValueDictionary.Add("id", id);
callInfo.RouteValueDictionary.Add("p", p);
return callInfo;
}
public override System.Web.Mvc.ActionResult Delete(int id) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Delete);
callInfo.RouteValueDictionary.Add("id", id);
return callInfo;
}
}
}
namespace Website.Controllers {
public partial class HomeController {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public HomeController() { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected HomeController(Dummy d) { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(ActionResult result) {
var callInfo = result.GetT4MVCResult();
return RedirectToRoute(callInfo.RouteValueDictionary);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public HomeController Actions { get { return MVC.Home; } }
[GeneratedCode("T4MVC", "2.0")]
public readonly string Area = "";
[GeneratedCode("T4MVC", "2.0")]
public readonly string Name = "Home";
static readonly ActionNamesClass s_actions = new ActionNamesClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionNamesClass ActionNames { get { return s_actions; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionNamesClass {
public readonly string Index = "Index";
}
static readonly ViewNames s_views = new ViewNames();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewNames Views { get { return s_views; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ViewNames {
public readonly string Index = "~/Views/Home/Index.cshtml";
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class T4MVC_HomeController: Website.Controllers.HomeController {
public T4MVC_HomeController() : base(Dummy.Instance) { }
public override System.Web.Mvc.ActionResult Index() {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Index);
return callInfo;
}
}
}
namespace T4MVC {
public class SharedController {
static readonly ViewNames s_views = new ViewNames();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewNames Views { get { return s_views; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ViewNames {
static readonly _Layouts s_Layouts = new _Layouts();
public _Layouts Layouts { get { return s_Layouts; } }
public partial class _Layouts{
public readonly string _Layout = "~/Views/Shared/Layouts/_Layout.cshtml";
public readonly string BlogLayout = "~/Views/Shared/Layouts/BlogLayout.cshtml";
}
static readonly _Partials s_Partials = new _Partials();
public _Partials Partials { get { return s_Partials; } }
public partial class _Partials{
public readonly string Navigation = "~/Views/Shared/Partials/Navigation.cshtml";
static readonly _Blog s_Blog = new _Blog();
public _Blog Blog { get { return s_Blog; } }
public partial class _Blog{
public readonly string Comment = "~/Views/Shared/Partials/Blog/Comment.cshtml";
public readonly string Post = "~/Views/Shared/Partials/Blog/Post.cshtml";
}
}
}
}
}
namespace Website.Areas.Music.Controllers {
public partial class HomeController {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public HomeController() { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected HomeController(Dummy d) { }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
protected RedirectToRouteResult RedirectToAction(ActionResult result) {
var callInfo = result.GetT4MVCResult();
return RedirectToRoute(callInfo.RouteValueDictionary);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Index() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Index);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public System.Web.Mvc.ActionResult Tag() {
return new T4MVC_ActionResult(Area, Name, ActionNames.Tag);
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public HomeController Actions { get { return MVC.Music.Home; } }
[GeneratedCode("T4MVC", "2.0")]
public readonly string Area = "Music";
[GeneratedCode("T4MVC", "2.0")]
public readonly string Name = "Home";
static readonly ActionNamesClass s_actions = new ActionNamesClass();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionNamesClass ActionNames { get { return s_actions; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionNamesClass {
public readonly string Index = "Index";
public readonly string Tag = "Tag";
}
static readonly ViewNames s_views = new ViewNames();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewNames Views { get { return s_views; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ViewNames {
public readonly string Index = "~/Areas/Music/Views/Home/Index.cshtml";
}
}
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class T4MVC_HomeController: Website.Areas.Music.Controllers.HomeController {
public T4MVC_HomeController() : base(Dummy.Instance) { }
public override System.Web.Mvc.ActionResult Index(string blogName) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Index);
callInfo.RouteValueDictionary.Add("blogName", blogName);
return callInfo;
}
public override System.Web.Mvc.ActionResult Tag(string blogName, string tag) {
var callInfo = new T4MVC_ActionResult(Area, Name, ActionNames.Tag);
callInfo.RouteValueDictionary.Add("blogName", blogName);
callInfo.RouteValueDictionary.Add("tag", tag);
return callInfo;
}
}
}
namespace T4MVC.Music {
public class SharedController {
static readonly ViewNames s_views = new ViewNames();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ViewNames Views { get { return s_views; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ViewNames {
}
}
}
namespace T4MVC {
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class Dummy {
private Dummy() { }
public static Dummy Instance = new Dummy();
}
}
#endregion T4MVC
#pragma warning restore 1591