6 | Hello all worlds, from Windows Azure Web Sites!
7 |
8 |
9 | Each of the links below provide a welcome message, each in a different programming language or framework. All of these frameworks are supported natively on Windows Azure Web Sites.
10 |
--------------------------------------------------------------------------------
/Source/Content/Site.css:
--------------------------------------------------------------------------------
1 | a, a:Visited {
2 | color: blue;
3 | }
4 |
5 | body {
6 | font-size: .85em;
7 | font-family: "Segoe UI", Verdana, Helvetica, Sans-Serif;
8 | color: #232323;
9 | background-color: #fff;
10 | }
11 |
12 | header, footer, nav, section {
13 | display: block;
14 | }
15 |
16 |
17 | /* Styles for basic forms
18 | -----------------------------------------------------------*/
19 | fieldset {
20 | border: 1px solid #ddd;
21 | padding: 0 1.4em 1.4em 1.4em;
22 | margin: 0 0 1.5em 0;
23 | }
24 |
25 | legend {
26 | font-size: 1.2em;
27 | font-weight: bold;
28 | }
29 |
30 | textarea {
31 | min-height: 75px;
32 | }
33 |
34 | .editor-label {
35 | margin: 1em 0 0 0;
36 | }
37 |
38 | .editor-field {
39 | margin: 0.5em 0 0 0;
40 | }
41 |
42 |
43 | /* Styles for validation helpers
44 | -----------------------------------------------------------*/
45 | .field-validation-error {
46 | color: #f00;
47 | }
48 |
49 | .field-validation-valid {
50 | display: none;
51 | }
52 |
53 | .input-validation-error {
54 | border: 1px solid #f00;
55 | background-color: #fee;
56 | }
57 |
58 | .validation-summary-errors {
59 | font-weight: bold;
60 | color: #f00;
61 | }
62 |
63 | .validation-summary-valid {
64 | display: none;
65 | }
66 |
--------------------------------------------------------------------------------
/Source/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | #[Bb]in/ - we need a bin for this to work easily
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 |
--------------------------------------------------------------------------------
/Source/Scripts/jquery.unobtrusive-ajax.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | ** Unobtrusive Ajax support library for jQuery
3 | ** Copyright (C) Microsoft Corporation. All rights reserved.
4 | */
5 | (function(a){var b="unobtrusiveAjaxClick",g="unobtrusiveValidation";function c(d,b){var a=window,c=(d||"").split(".");while(a&&c.length)a=a[c.shift()];if(typeof a==="function")return a;b.push(d);return Function.constructor.apply(null,b)}function d(a){return a==="GET"||a==="POST"}function f(b,a){!d(a)&&b.setRequestHeader("X-HTTP-Method-Override",a)}function h(c,b,e){var d;if(e.indexOf("application/x-javascript")!==-1)return;d=(c.getAttribute("data-ajax-mode")||"").toUpperCase();a(c.getAttribute("data-ajax-update")).each(function(f,c){var e;switch(d){case"BEFORE":e=c.firstChild;a("").html(b).contents().each(function(){c.insertBefore(this,e)});break;case"AFTER":a("").html(b).contents().each(function(){c.appendChild(this)});break;default:a(c).html(b)}})}function e(b,e){var j,k,g,i;j=b.getAttribute("data-ajax-confirm");if(j&&!window.confirm(j))return;k=a(b.getAttribute("data-ajax-loading"));i=b.getAttribute("data-ajax-loading-duration")||0;a.extend(e,{type:b.getAttribute("data-ajax-method")||undefined,url:b.getAttribute("data-ajax-url")||undefined,beforeSend:function(d){var a;f(d,g);a=c(b.getAttribute("data-ajax-begin"),["xhr"]).apply(this,arguments);a!==false&&k.show(i);return a},complete:function(){k.hide(i);c(b.getAttribute("data-ajax-complete"),["xhr","status"]).apply(this,arguments)},success:function(a,e,d){h(b,a,d.getResponseHeader("Content-Type")||"text/html");c(b.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(this,arguments)},error:c(b.getAttribute("data-ajax-failure"),["xhr","status","error"])});e.data.push({name:"X-Requested-With",value:"XMLHttpRequest"});g=e.type.toUpperCase();if(!d(g)){e.type="POST";e.data.push({name:"X-HTTP-Method-Override",value:g})}a.ajax(e)}function i(c){var b=a(c).data(g);return!b||!b.validate||b.validate()}a("a[data-ajax=true]").live("click",function(a){a.preventDefault();e(this,{url:this.href,type:"GET",data:[]})});a("form[data-ajax=true] input[type=image]").live("click",function(c){var g=c.target.name,d=a(c.target),f=d.parents("form")[0],e=d.offset();a(f).data(b,[{name:g+".x",value:Math.round(c.pageX-e.left)},{name:g+".y",value:Math.round(c.pageY-e.top)}]);setTimeout(function(){a(f).removeData(b)},0)});a("form[data-ajax=true] :submit").live("click",function(c){var e=c.target.name,d=a(c.target).parents("form")[0];a(d).data(b,e?[{name:e,value:c.target.value}]:[]);setTimeout(function(){a(d).removeData(b)},0)});a("form[data-ajax=true]").live("submit",function(d){var c=a(this).data(b)||[];d.preventDefault();if(!i(this))return;e(this,{url:this.action,type:this.method||"GET",data:c.concat(a(this).serializeArray())})})})(jQuery);
--------------------------------------------------------------------------------
/Source/Views/Web.config:
--------------------------------------------------------------------------------
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 |
39 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Source/bin/System.Web.WebPages.Deployment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System.Web.WebPages.Deployment
5 |
6 |
7 |
8 | Provides a registration point for pre-application start code for Web Pages deployment.
9 |
10 |
11 | Registers pre-application start code for Web Pages deployment.
12 |
13 |
14 | Provides methods to confirm the deployment of a Web Pages application.
15 |
16 |
17 | Represents the prefix for files that are stored in the cache.
18 |
19 |
20 | Returns the full path of the folder that contains ASP.NET Web Pages assemblies for the specified version.
21 | The full path of the folder that contains ASP.NET Web Pages assemblies.
22 | The version of the assemblies.
23 |
24 | is null.
25 | The registry key for the path cannot be found.-or-The path cannot be found.
26 |
27 |
28 |
29 |
30 | Returns the version of ASP.NET Web Pages that is installed.
31 | The version of ASP.NET Web Pages that is installed, or null if the version is undetermined.
32 | The path of the root directory for the application.
33 |
34 | is null or empty.
35 |
36 |
37 |
38 |
39 | Returns a value that indicates whether the Web Pages application is enabled.
40 | true if the Web Pages application is enabled; otherwise, false.
41 | The path of the root directory for the application.
42 |
43 | is null or empty.
44 |
45 |
46 | Returns a value that indicates whether the Web Pages application is explicitly disabled.
47 | true if the Web Pages application is explicitly disabled; otherwise, false.
48 | The path of the root directory for the application.
49 |
50 | is null or empty.
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Source/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
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 |
--------------------------------------------------------------------------------
/Source/Scripts/jquery.validate.unobtrusive.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | ** Unobtrusive validation support library for jQuery and jQuery Validate
3 | ** Copyright (C) Microsoft Corporation. All rights reserved.
4 | */
5 | (function(a){var d=a.validator,b,e="unobtrusiveValidation";function c(a,b,c){a.rules[b]=c;if(a.message)a.messages[b]=a.message}function j(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(a){return a.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function h(a){return a.substr(0,a.lastIndexOf(".")+1)}function g(a,b){if(a.indexOf("*.")===0)a=a.replace("*.",b);return a}function m(c,d){var b=a(this).find("[data-valmsg-for='"+f(d[0].name)+"']"),e=a.parseJSON(b.attr("data-valmsg-replace"))!==false;b.removeClass("field-validation-valid").addClass("field-validation-error");c.data("unobtrusiveContainer",b);if(e){b.empty();c.removeClass("input-validation-error").appendTo(b)}else c.hide()}function l(e,d){var c=a(this).find("[data-valmsg-summary=true]"),b=c.find("ul");if(b&&b.length&&d.errorList.length){b.empty();c.addClass("validation-summary-errors").removeClass("validation-summary-valid");a.each(d.errorList,function(){a("").html(this.message).appendTo(b)})}}function k(c){var b=c.data("unobtrusiveContainer"),d=a.parseJSON(b.attr("data-valmsg-replace"));if(b){b.addClass("field-validation-valid").removeClass("field-validation-error");c.removeData("unobtrusiveContainer");d&&b.empty()}}function n(){var b=a(this);b.data("validator").resetForm();b.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");b.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}function i(c){var b=a(c),d=b.data(e),f=a.proxy(n,c);if(!d){d={options:{errorClass:"input-validation-error",errorElement:"span",errorPlacement:a.proxy(m,c),invalidHandler:a.proxy(l,c),messages:{},rules:{},success:a.proxy(k,c)},attachValidation:function(){b.unbind("reset."+e,f).bind("reset."+e,f).validate(this.options)},validate:function(){b.validate();return b.valid()}};b.data(e,d)}return d}d.unobtrusive={adapters:[],parseElement:function(b,h){var d=a(b),f=d.parents("form")[0],c,e,g;if(!f)return;c=i(f);c.options.rules[b.name]=e={};c.options.messages[b.name]=g={};a.each(this.adapters,function(){var c="data-val-"+this.name,i=d.attr(c),h={};if(i!==undefined){c+="-";a.each(this.params,function(){h[this]=d.attr(c+this)});this.adapt({element:b,form:f,message:i,params:h,rules:e,messages:g})}});a.extend(e,{__dummy__:true});!h&&c.attachValidation()},parse:function(b){var c=a(b).parents("form").andSelf().add(a(b).find("form")).filter("form");a(b).find(":input[data-val=true]").each(function(){d.unobtrusive.parseElement(this,true)});c.each(function(){var a=i(this);a&&a.attachValidation()})}};b=d.unobtrusive.adapters;b.add=function(c,a,b){if(!b){b=a;a=[]}this.push({name:c,params:a,adapt:b});return this};b.addBool=function(a,b){return this.add(a,function(d){c(d,b||a,true)})};b.addMinMax=function(e,g,f,a,d,b){return this.add(e,[d||"min",b||"max"],function(b){var e=b.params.min,d=b.params.max;if(e&&d)c(b,a,[e,d]);else if(e)c(b,g,e);else d&&c(b,f,d)})};b.addSingleVal=function(a,b,d){return this.add(a,[b||"val"],function(e){c(e,d||a,e.params[b])})};d.addMethod("__dummy__",function(){return true});d.addMethod("regex",function(b,c,d){var a;if(this.optional(c))return true;a=(new RegExp(d)).exec(b);return a&&a.index===0&&a[0].length===b.length});b.addSingleVal("accept","exts").addSingleVal("regex","pattern");b.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");b.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");b.add("equalto",["other"],function(b){var i=h(b.element.name),j=b.params.other,d=g(j,i),e=a(b.form).find(":input[name='"+f(d)+"']")[0];c(b,"equalTo",e)});b.add("required",function(a){(a.element.tagName.toUpperCase()!=="INPUT"||a.element.type.toUpperCase()!=="CHECKBOX")&&c(a,"required",true)});b.add("remote",["url","type","additionalfields"],function(b){var d={url:b.params.url,type:b.params.type||"GET",data:{}},e=h(b.element.name);a.each(j(b.params.additionalfields||b.element.name),function(i,h){var c=g(h,e);d.data[c]=function(){return a(b.form).find(":input[name='"+f(c)+"']").val()}});c(b,"remote",d)});a(function(){d.unobtrusive.parse(document)})})(jQuery);
--------------------------------------------------------------------------------
/Source/bin/System.Net.Http.WebRequest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System.Net.Http.WebRequest
5 |
6 |
7 |
8 | Represents the class that is used to create special for use with the Real-Time-Communications (RTC) background notification infrastructure.
9 |
10 |
11 | Creates a special for use with the Real-Time-Communications (RTC) background notification infrastructure.
12 | Returns .An HTTP request message for use with the RTC background notification infrastructure.
13 | The HTTP method.
14 | The Uri the request is sent to.
15 |
16 |
17 | Provides desktop-specific features not available to Metro apps or other environments.
18 |
19 |
20 | Initializes a new instance of the class.
21 |
22 |
23 | Gets or sets a value that indicates whether to pipeline the request to the Internet resource.
24 | Returns .true if the request should be pipelined; otherwise, false. The default is true.
25 |
26 |
27 | Gets or sets a value indicating the level of authentication and impersonation used for this request.
28 | Returns .A bitwise combination of the values. The default value is .
29 |
30 |
31 | Gets or sets the cache policy for this request.
32 | Returns .A object that defines a cache policy. The default is .
33 |
34 |
35 | Gets or sets the collection of security certificates that are associated with this request.
36 | Returns .The collection of security certificates associated with this request.
37 |
38 |
39 | Gets or sets the amount of time, in milliseconds, the application will wait for 100-continue from the server before uploading data.
40 | Returns .The amount of time, in milliseconds, the application will wait for 100-continue from the server before uploading data. The default value is 350 milliseconds.
41 |
42 |
43 | Gets or sets the impersonation level for the current request.
44 | Returns .The impersonation level for the request. The default is .
45 |
46 |
47 | Gets or sets the maximum allowed length of the response headers.
48 | Returns .The length, in kilobytes (1024 bytes), of the response headers.
49 |
50 |
51 | Gets or sets a time-out in milliseconds when writing a request to or reading a response from a server.
52 | Returns .The number of milliseconds before the writing or reading times out. The default value is 300,000 milliseconds (5 minutes).
53 |
54 |
55 | Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.
56 | Returns .true to keep the authenticated connection open; otherwise, false.
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Source/Scripts/jquery.unobtrusive-ajax.js:
--------------------------------------------------------------------------------
1 | /*!
2 | ** Unobtrusive Ajax support library for jQuery
3 | ** Copyright (C) Microsoft Corporation. All rights reserved.
4 | */
5 |
6 | /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
7 | /*global window: false, jQuery: false */
8 |
9 | (function ($) {
10 | var data_click = "unobtrusiveAjaxClick",
11 | data_validation = "unobtrusiveValidation";
12 |
13 | function getFunction(code, argNames) {
14 | var fn = window, parts = (code || "").split(".");
15 | while (fn && parts.length) {
16 | fn = fn[parts.shift()];
17 | }
18 | if (typeof (fn) === "function") {
19 | return fn;
20 | }
21 | argNames.push(code);
22 | return Function.constructor.apply(null, argNames);
23 | }
24 |
25 | function isMethodProxySafe(method) {
26 | return method === "GET" || method === "POST";
27 | }
28 |
29 | function asyncOnBeforeSend(xhr, method) {
30 | if (!isMethodProxySafe(method)) {
31 | xhr.setRequestHeader("X-HTTP-Method-Override", method);
32 | }
33 | }
34 |
35 | function asyncOnSuccess(element, data, contentType) {
36 | var mode;
37 |
38 | if (contentType.indexOf("application/x-javascript") !== -1) { // jQuery already executes JavaScript for us
39 | return;
40 | }
41 |
42 | mode = (element.getAttribute("data-ajax-mode") || "").toUpperCase();
43 | $(element.getAttribute("data-ajax-update")).each(function (i, update) {
44 | var top;
45 |
46 | switch (mode) {
47 | case "BEFORE":
48 | top = update.firstChild;
49 | $("").html(data).contents().each(function () {
50 | update.insertBefore(this, top);
51 | });
52 | break;
53 | case "AFTER":
54 | $("").html(data).contents().each(function () {
55 | update.appendChild(this);
56 | });
57 | break;
58 | default:
59 | $(update).html(data);
60 | break;
61 | }
62 | });
63 | }
64 |
65 | function asyncRequest(element, options) {
66 | var confirm, loading, method, duration;
67 |
68 | confirm = element.getAttribute("data-ajax-confirm");
69 | if (confirm && !window.confirm(confirm)) {
70 | return;
71 | }
72 |
73 | loading = $(element.getAttribute("data-ajax-loading"));
74 | duration = element.getAttribute("data-ajax-loading-duration") || 0;
75 |
76 | $.extend(options, {
77 | type: element.getAttribute("data-ajax-method") || undefined,
78 | url: element.getAttribute("data-ajax-url") || undefined,
79 | beforeSend: function (xhr) {
80 | var result;
81 | asyncOnBeforeSend(xhr, method);
82 | result = getFunction(element.getAttribute("data-ajax-begin"), ["xhr"]).apply(this, arguments);
83 | if (result !== false) {
84 | loading.show(duration);
85 | }
86 | return result;
87 | },
88 | complete: function () {
89 | loading.hide(duration);
90 | getFunction(element.getAttribute("data-ajax-complete"), ["xhr", "status"]).apply(this, arguments);
91 | },
92 | success: function (data, status, xhr) {
93 | asyncOnSuccess(element, data, xhr.getResponseHeader("Content-Type") || "text/html");
94 | getFunction(element.getAttribute("data-ajax-success"), ["data", "status", "xhr"]).apply(this, arguments);
95 | },
96 | error: getFunction(element.getAttribute("data-ajax-failure"), ["xhr", "status", "error"])
97 | });
98 |
99 | options.data.push({ name: "X-Requested-With", value: "XMLHttpRequest" });
100 |
101 | method = options.type.toUpperCase();
102 | if (!isMethodProxySafe(method)) {
103 | options.type = "POST";
104 | options.data.push({ name: "X-HTTP-Method-Override", value: method });
105 | }
106 |
107 | $.ajax(options);
108 | }
109 |
110 | function validate(form) {
111 | var validationInfo = $(form).data(data_validation);
112 | return !validationInfo || !validationInfo.validate || validationInfo.validate();
113 | }
114 |
115 | $("a[data-ajax=true]").live("click", function (evt) {
116 | evt.preventDefault();
117 | asyncRequest(this, {
118 | url: this.href,
119 | type: "GET",
120 | data: []
121 | });
122 | });
123 |
124 | $("form[data-ajax=true] input[type=image]").live("click", function (evt) {
125 | var name = evt.target.name,
126 | $target = $(evt.target),
127 | form = $target.parents("form")[0],
128 | offset = $target.offset();
129 |
130 | $(form).data(data_click, [
131 | { name: name + ".x", value: Math.round(evt.pageX - offset.left) },
132 | { name: name + ".y", value: Math.round(evt.pageY - offset.top) }
133 | ]);
134 |
135 | setTimeout(function () {
136 | $(form).removeData(data_click);
137 | }, 0);
138 | });
139 |
140 | $("form[data-ajax=true] :submit").live("click", function (evt) {
141 | var name = evt.target.name,
142 | form = $(evt.target).parents("form")[0];
143 |
144 | $(form).data(data_click, name ? [{ name: name, value: evt.target.value }] : []);
145 |
146 | setTimeout(function () {
147 | $(form).removeData(data_click);
148 | }, 0);
149 | });
150 |
151 | $("form[data-ajax=true]").live("submit", function (evt) {
152 | var clickInfo = $(this).data(data_click) || [];
153 | evt.preventDefault();
154 | if (!validate(this)) {
155 | return;
156 | }
157 | asyncRequest(this, {
158 | url: this.action,
159 | type: this.method || "GET",
160 | data: clickInfo.concat($(this).serializeArray())
161 | });
162 | });
163 | }(jQuery));
--------------------------------------------------------------------------------
/GettingStarted.md:
--------------------------------------------------------------------------------
1 |
2 | # Hello All Worlds Demonstration#
3 |
4 | The Hello All Worlds Demonstration shows how all of the major web development frameworks - PHP, Node.js, and various Microsoft tools from ASP to Razor syntax Web Pages - are all enabled by default in Windows Azure Web Sites.
5 |
6 | -------------------------------------------------------
7 |
8 | Clone the repository from the GitHub.com repository.
9 |
10 | 
11 |
12 | Open up the Windows Azure Web Sites management portal. Click the New button to start creating a new web site.
13 |
14 | 
15 |
16 | Select the Web Site -> Quick Create menu. Then, type in a name for the site. In this example, the site will be named _AllInOne_.
17 |
18 | 
19 |
20 | Click the name of the site (the leftmost column) in the list of sites.
21 |
22 | 
23 |
24 | Click the link labeled _Set up Git publishing_.
25 |
26 | 
27 |
28 | Enter in a username and password, then confirm the password, that will be used during the Git deployment process. This is the user account and password you'll use in your Git client.
29 |
30 | 
31 |
32 | The portal will reflect the creation of the Git repository has started.
33 |
34 | 
35 |
36 | Once the Git repository has been created the portal will reflect the creation has completed.
37 |
38 | Click the link labeled _Clone Windows Azure site to my computer_.
39 |
40 | 
41 |
42 | The portal will display a series of commands that, when executed, will result in the Git client cloning the contents of the new site to the client computer.
43 |
44 | Copy the command beginning with _Git clone..._ to the clipboard to make execution easier in the next step.
45 |
46 | 
47 |
48 | Using the Git Bash command line client, paste (_Alt-Space-E-P_) in the command copied from the portal.
49 |
50 | **Note**, adding a string at the end of the _Git clone_ command will clone the repository into a separate directory than was copied down from GitHub.com. _This wont be required after release, but since the portal is currently not visible to GitHub.com we can't go directly from a GitHub.com repository directly into Windows Azure Web Sites_.
51 |
52 | 
53 |
54 | The Git repository will be cloned to the client computer and messages will be displayed to the user.
55 |
56 | 
57 |
58 | Copy the files from the folder created by cloning the GitHub.com repository into the folder created by cloning the Windows Azure Web Sites repository. _Again, this part of the process won't be required following release, we are only doing it to copy the files into the new repository's folder._
59 |
60 | 
61 |
62 | Back in the Git Bash client, CD into the new site's repository.
63 |
64 | 
65 |
66 | Type the command _git add ._ to add the new files to the site's Git repository
67 |
68 | 
69 |
70 | Execute the command _git commit -m 'added files for site'_ in the Git Bash client. This will create a commit to the repository and provide the command you enter as the comment associated with the commit.
71 |
72 | 
73 |
74 | The commit message will display in the Git Bash client. Once the process completes, execute the command _git push origin master_ to push the files and the commit message up to the server.
75 |
76 | 
77 |
78 | Enter the password used to create the Git repository user.
79 |
80 | **Note**: If you want to see or demonstrate how the portal responds automatically upon a Git commit, make sure the portal window is visible at the same time as this command's execution.
81 |
82 | 
83 |
84 | The files will be pushed to the server. As the files are being pushed, _Alt-Tab_ to view the portal browser window or make sure both windows are visible simultaneously.
85 |
86 | 
87 |
88 | Each time files are pushed to the server using Git the dashboard will automatically update to reflect the deployment.
89 |
90 | 
91 |
92 | Click the deployment item labeled _Active Deployment_ and take note of the menu that appears in the portal.
93 |
94 | 
95 |
96 | The menu will appear. Once it does, click the icon labeled _Browse_.
97 |
98 | 
99 |
100 | The _Hello All Worlds_ demo will open up in the browser. Clicking each of the links will open up a different _Hello World_ message in a new browser window.
101 |
102 | Click the link labeled _Static HTML_.
103 |
104 | 
105 |
106 | The static file will open in a new browser window.
107 |
108 | 
109 |
110 | Clicking each of the additional links will execute each of the Hello World message windows written using each of the frameworks supported by Windows Azure Web Sites. Below, the Node.js sample is visible.
111 |
112 | 
113 |
114 | To see the JSON output of the ASP.NET Web API example, press the _F12_ key to open up the IE developer tools. Click the _Network_ tab, then click the button labeled _Start Capturing_.
115 |
116 | 
117 |
118 | Click the _Web API_ sample link. A dialog may appear requesting the user accept/decline the file-download process. This happens since the output format is JSON, and IE's default behavior is to request the user download JSON files rather than open them up in the browser.
119 |
120 | Regardless of the answer provided by the download file-process, the results of the HTTP command are shown as a line item in the browser.
121 |
122 | 
123 |
124 | Click the _Response body_ tab to view the JSON output in the tools window.
125 |
126 | 
--------------------------------------------------------------------------------
/Source/bin/System.Web.Http.WebHost.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System.Web.Http.WebHost
5 |
6 |
7 |
8 | Provides a global for ASP applications.
9 |
10 |
11 | Gets the global .
12 |
13 |
14 | Extension methods for
15 |
16 |
17 | Maps the specified route template and sets default constraints, and namespaces.
18 | A reference to the mapped route.
19 | A collection of routes for the application.
20 | The name of the route to map.
21 | The route template for the route.
22 | An object that contains default route values.
23 |
24 |
25 | Maps the specified route template and sets default route values, constraints, and namespaces.
26 | A reference to the mapped route.
27 | A collection of routes for the application.
28 | The name of the route to map.
29 | The route template for the route.
30 | An object that contains default route values.
31 | A set of expressions that specify values for routeTemplate.
32 |
33 |
34 | A that passes ASP.NET requests into the pipeline and write the result back.
35 |
36 |
37 | Initializes a new instance of the class.
38 | The route data.
39 |
40 |
41 | Begins the process request.
42 | An that contains information about the status of the process.
43 | The HTTP context base.
44 | The callback.
45 | The state.
46 |
47 |
48 | Provides an asynchronous process End method when the process ends.
49 | An that contains information about the status of the process.
50 |
51 |
52 | Gets a value indicating whether another request can use the instance.
53 |
54 |
55 | Processes the request.
56 | The HTTP context base.
57 |
58 |
59 | Begins processing the request.
60 | An that contains information about the status of the process.
61 | The HTTP context.
62 | The callback.
63 | The state.
64 |
65 |
66 | Provides an asynchronous process End method when the process ends.
67 | An that contains information about the status of the process.
68 |
69 |
70 | Gets a value indicating whether another request can use the instance.
71 |
72 |
73 | Processes the request.
74 | The HTTP context base.
75 |
76 |
77 | A that returns instances of that can pass requests to a given instance.
78 |
79 |
80 | Initializes a new instance of the class.
81 |
82 |
83 | Provides the object that processes the request.
84 | An object that processes the request.
85 | An object that encapsulates information about the request.
86 |
87 |
88 | Gets the singleton instance.
89 |
90 |
91 | Provides the object that processes the request.
92 | An object that processes the request.
93 | An object that encapsulates information about the request.
94 |
95 |
96 |
--------------------------------------------------------------------------------
/Source/Scripts/jquery.validate.unobtrusive.js:
--------------------------------------------------------------------------------
1 | /*!
2 | ** Unobtrusive validation support library for jQuery and jQuery Validate
3 | ** Copyright (C) Microsoft Corporation. All rights reserved.
4 | */
5 |
6 | /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
7 | /*global document: false, jQuery: false */
8 |
9 | (function ($) {
10 | var $jQval = $.validator,
11 | adapters,
12 | data_validation = "unobtrusiveValidation";
13 |
14 | function setValidationValues(options, ruleName, value) {
15 | options.rules[ruleName] = value;
16 | if (options.message) {
17 | options.messages[ruleName] = options.message;
18 | }
19 | }
20 |
21 | function splitAndTrim(value) {
22 | return value.replace(/^\s+|\s+$/g, "").split(/\s*,\s*/g);
23 | }
24 |
25 | function escapeAttributeValue(value) {
26 | // As mentioned on http://api.jquery.com/category/selectors/
27 | return value.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g, "\\$1");
28 | }
29 |
30 | function getModelPrefix(fieldName) {
31 | return fieldName.substr(0, fieldName.lastIndexOf(".") + 1);
32 | }
33 |
34 | function appendModelPrefix(value, prefix) {
35 | if (value.indexOf("*.") === 0) {
36 | value = value.replace("*.", prefix);
37 | }
38 | return value;
39 | }
40 |
41 | function onError(error, inputElement) { // 'this' is the form element
42 | var container = $(this).find("[data-valmsg-for='" + escapeAttributeValue(inputElement[0].name) + "']"),
43 | replace = $.parseJSON(container.attr("data-valmsg-replace")) !== false;
44 |
45 | container.removeClass("field-validation-valid").addClass("field-validation-error");
46 | error.data("unobtrusiveContainer", container);
47 |
48 | if (replace) {
49 | container.empty();
50 | error.removeClass("input-validation-error").appendTo(container);
51 | }
52 | else {
53 | error.hide();
54 | }
55 | }
56 |
57 | function onErrors(event, validator) { // 'this' is the form element
58 | var container = $(this).find("[data-valmsg-summary=true]"),
59 | list = container.find("ul");
60 |
61 | if (list && list.length && validator.errorList.length) {
62 | list.empty();
63 | container.addClass("validation-summary-errors").removeClass("validation-summary-valid");
64 |
65 | $.each(validator.errorList, function () {
66 | $("").html(this.message).appendTo(list);
67 | });
68 | }
69 | }
70 |
71 | function onSuccess(error) { // 'this' is the form element
72 | var container = error.data("unobtrusiveContainer"),
73 | replace = $.parseJSON(container.attr("data-valmsg-replace"));
74 |
75 | if (container) {
76 | container.addClass("field-validation-valid").removeClass("field-validation-error");
77 | error.removeData("unobtrusiveContainer");
78 |
79 | if (replace) {
80 | container.empty();
81 | }
82 | }
83 | }
84 |
85 | function onReset(event) { // 'this' is the form element
86 | var $form = $(this);
87 | $form.data("validator").resetForm();
88 | $form.find(".validation-summary-errors")
89 | .addClass("validation-summary-valid")
90 | .removeClass("validation-summary-errors");
91 | $form.find(".field-validation-error")
92 | .addClass("field-validation-valid")
93 | .removeClass("field-validation-error")
94 | .removeData("unobtrusiveContainer")
95 | .find(">*") // If we were using valmsg-replace, get the underlying error
96 | .removeData("unobtrusiveContainer");
97 | }
98 |
99 | function validationInfo(form) {
100 | var $form = $(form),
101 | result = $form.data(data_validation),
102 | onResetProxy = $.proxy(onReset, form);
103 |
104 | if (!result) {
105 | result = {
106 | options: { // options structure passed to jQuery Validate's validate() method
107 | errorClass: "input-validation-error",
108 | errorElement: "span",
109 | errorPlacement: $.proxy(onError, form),
110 | invalidHandler: $.proxy(onErrors, form),
111 | messages: {},
112 | rules: {},
113 | success: $.proxy(onSuccess, form)
114 | },
115 | attachValidation: function () {
116 | $form
117 | .unbind("reset." + data_validation, onResetProxy)
118 | .bind("reset." + data_validation, onResetProxy)
119 | .validate(this.options);
120 | },
121 | validate: function () { // a validation function that is called by unobtrusive Ajax
122 | $form.validate();
123 | return $form.valid();
124 | }
125 | };
126 | $form.data(data_validation, result);
127 | }
128 |
129 | return result;
130 | }
131 |
132 | $jQval.unobtrusive = {
133 | adapters: [],
134 |
135 | parseElement: function (element, skipAttach) {
136 | ///
137 | /// Parses a single HTML element for unobtrusive validation attributes.
138 | ///
139 | /// The HTML element to be parsed.
140 | /// [Optional] true to skip attaching the
141 | /// validation to the form. If parsing just this single element, you should specify true.
142 | /// If parsing several elements, you should specify false, and manually attach the validation
143 | /// to the form when you are finished. The default is false.
144 | var $element = $(element),
145 | form = $element.parents("form")[0],
146 | valInfo, rules, messages;
147 |
148 | if (!form) { // Cannot do client-side validation without a form
149 | return;
150 | }
151 |
152 | valInfo = validationInfo(form);
153 | valInfo.options.rules[element.name] = rules = {};
154 | valInfo.options.messages[element.name] = messages = {};
155 |
156 | $.each(this.adapters, function () {
157 | var prefix = "data-val-" + this.name,
158 | message = $element.attr(prefix),
159 | paramValues = {};
160 |
161 | if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
162 | prefix += "-";
163 |
164 | $.each(this.params, function () {
165 | paramValues[this] = $element.attr(prefix + this);
166 | });
167 |
168 | this.adapt({
169 | element: element,
170 | form: form,
171 | message: message,
172 | params: paramValues,
173 | rules: rules,
174 | messages: messages
175 | });
176 | }
177 | });
178 |
179 | $.extend(rules, { "__dummy__": true });
180 |
181 | if (!skipAttach) {
182 | valInfo.attachValidation();
183 | }
184 | },
185 |
186 | parse: function (selector) {
187 | ///
188 | /// Parses all the HTML elements in the specified selector. It looks for input elements decorated
189 | /// with the [data-val=true] attribute value and enables validation according to the data-val-*
190 | /// attribute values.
191 | ///
192 | /// Any valid jQuery selector.
193 | var $forms = $(selector)
194 | .parents("form")
195 | .andSelf()
196 | .add($(selector).find("form"))
197 | .filter("form");
198 |
199 | $(selector).find(":input[data-val=true]").each(function () {
200 | $jQval.unobtrusive.parseElement(this, true);
201 | });
202 |
203 | $forms.each(function () {
204 | var info = validationInfo(this);
205 | if (info) {
206 | info.attachValidation();
207 | }
208 | });
209 | }
210 | };
211 |
212 | adapters = $jQval.unobtrusive.adapters;
213 |
214 | adapters.add = function (adapterName, params, fn) {
215 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation.
216 | /// The name of the adapter to be added. This matches the name used
217 | /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
218 | /// [Optional] An array of parameter names (strings) that will
219 | /// be extracted from the data-val-nnnn-mmmm HTML attributes (where nnnn is the adapter name, and
220 | /// mmmm is the parameter name).
221 | /// The function to call, which adapts the values from the HTML
222 | /// attributes into jQuery Validate rules and/or messages.
223 | ///
224 | if (!fn) { // Called with no params, just a function
225 | fn = params;
226 | params = [];
227 | }
228 | this.push({ name: adapterName, params: params, adapt: fn });
229 | return this;
230 | };
231 |
232 | adapters.addBool = function (adapterName, ruleName) {
233 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
234 | /// the jQuery Validate validation rule has no parameter values.
235 | /// The name of the adapter to be added. This matches the name used
236 | /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
237 | /// [Optional] The name of the jQuery Validate rule. If not provided, the value
238 | /// of adapterName will be used instead.
239 | ///
240 | return this.add(adapterName, function (options) {
241 | setValidationValues(options, ruleName || adapterName, true);
242 | });
243 | };
244 |
245 | adapters.addMinMax = function (adapterName, minRuleName, maxRuleName, minMaxRuleName, minAttribute, maxAttribute) {
246 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
247 | /// the jQuery Validate validation has three potential rules (one for min-only, one for max-only, and
248 | /// one for min-and-max). The HTML parameters are expected to be named -min and -max.
249 | /// The name of the adapter to be added. This matches the name used
250 | /// in the data-val-nnnn HTML attribute (where nnnn is the adapter name).
251 | /// The name of the jQuery Validate rule to be used when you only
252 | /// have a minimum value.
253 | /// The name of the jQuery Validate rule to be used when you only
254 | /// have a maximum value.
255 | /// The name of the jQuery Validate rule to be used when you
256 | /// have both a minimum and maximum value.
257 | /// [Optional] The name of the HTML attribute that
258 | /// contains the minimum value. The default is "min".
259 | /// [Optional] The name of the HTML attribute that
260 | /// contains the maximum value. The default is "max".
261 | ///
262 | return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
263 | var min = options.params.min,
264 | max = options.params.max;
265 |
266 | if (min && max) {
267 | setValidationValues(options, minMaxRuleName, [min, max]);
268 | }
269 | else if (min) {
270 | setValidationValues(options, minRuleName, min);
271 | }
272 | else if (max) {
273 | setValidationValues(options, maxRuleName, max);
274 | }
275 | });
276 | };
277 |
278 | adapters.addSingleVal = function (adapterName, attribute, ruleName) {
279 | /// Adds a new adapter to convert unobtrusive HTML into a jQuery Validate validation, where
280 | /// the jQuery Validate validation rule has a single value.
281 | /// The name of the adapter to be added. This matches the name used
282 | /// in the data-val-nnnn HTML attribute(where nnnn is the adapter name).
283 | /// [Optional] The name of the HTML attribute that contains the value.
284 | /// The default is "val".
285 | /// [Optional] The name of the jQuery Validate rule. If not provided, the value
286 | /// of adapterName will be used instead.
287 | ///
288 | return this.add(adapterName, [attribute || "val"], function (options) {
289 | setValidationValues(options, ruleName || adapterName, options.params[attribute]);
290 | });
291 | };
292 |
293 | $jQval.addMethod("__dummy__", function (value, element, params) {
294 | return true;
295 | });
296 |
297 | $jQval.addMethod("regex", function (value, element, params) {
298 | var match;
299 | if (this.optional(element)) {
300 | return true;
301 | }
302 |
303 | match = new RegExp(params).exec(value);
304 | return (match && (match.index === 0) && (match[0].length === value.length));
305 | });
306 |
307 | adapters.addSingleVal("accept", "exts").addSingleVal("regex", "pattern");
308 | adapters.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");
309 | adapters.addMinMax("length", "minlength", "maxlength", "rangelength").addMinMax("range", "min", "max", "range");
310 | adapters.add("equalto", ["other"], function (options) {
311 | var prefix = getModelPrefix(options.element.name),
312 | other = options.params.other,
313 | fullOtherName = appendModelPrefix(other, prefix),
314 | element = $(options.form).find(":input[name='" + escapeAttributeValue(fullOtherName) + "']")[0];
315 |
316 | setValidationValues(options, "equalTo", element);
317 | });
318 | adapters.add("required", function (options) {
319 | // jQuery Validate equates "required" with "mandatory" for checkbox elements
320 | if (options.element.tagName.toUpperCase() !== "INPUT" || options.element.type.toUpperCase() !== "CHECKBOX") {
321 | setValidationValues(options, "required", true);
322 | }
323 | });
324 | adapters.add("remote", ["url", "type", "additionalfields"], function (options) {
325 | var value = {
326 | url: options.params.url,
327 | type: options.params.type || "GET",
328 | data: {}
329 | },
330 | prefix = getModelPrefix(options.element.name);
331 |
332 | $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) {
333 | var paramName = appendModelPrefix(fieldName, prefix);
334 | value.data[paramName] = function () {
335 | return $(options.form).find(":input[name='" + escapeAttributeValue(paramName) + "']").val();
336 | };
337 | });
338 |
339 | setValidationValues(options, "remote", value);
340 | });
341 |
342 | $(function () {
343 | $jQval.unobtrusive.parse(document);
344 | });
345 | } (jQuery));
--------------------------------------------------------------------------------
/Source/bin/System.Web.WebPages.Razor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System.Web.WebPages.Razor
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
13 |
14 |
15 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
16 |
17 |
18 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
19 |
20 |
21 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
22 |
23 |
24 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
25 |
26 |
27 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
28 |
29 |
30 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
31 |
32 |
33 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
34 |
35 |
36 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
37 |
38 |
39 |
40 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
41 |
42 |
43 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
44 |
45 |
46 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
47 |
48 |
49 |
50 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
51 |
52 |
53 |
54 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
55 |
56 |
57 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
58 |
59 |
60 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
61 |
62 |
63 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
64 |
65 |
66 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
67 |
68 |
69 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
70 |
71 |
72 |
73 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
74 |
75 |
76 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
77 |
78 |
79 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
80 |
81 |
82 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
83 |
84 |
85 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
86 |
87 |
88 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
89 |
90 |
91 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
92 |
93 |
94 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
95 |
96 |
97 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
98 |
99 |
100 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
101 |
102 |
103 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
104 |
105 |
106 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
107 |
108 |
109 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
110 |
111 |
112 |
113 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
114 |
115 |
116 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
117 |
118 |
119 |
120 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
121 |
122 |
123 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
124 |
125 |
126 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
127 |
128 |
129 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
130 |
131 |
132 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
133 |
134 |
135 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
136 |
137 |
138 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
139 |
140 |
141 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
142 |
143 |
144 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
145 |
146 |
147 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
148 |
149 |
150 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
151 |
152 |
153 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
154 |
155 |
156 | This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
157 |
158 |
159 | Provides configuration system support for the host configuration section.
160 |
161 |
162 | Initializes a new instance of the class.
163 |
164 |
165 | Gets or sets the host factory.
166 | The host factory.
167 |
168 |
169 | Represents the name of the configuration section for a Razor host environment.
170 |
171 |
172 | Provides configuration system support for the pages configuration section.
173 |
174 |
175 | Initializes a new instance of the class.
176 |
177 |
178 | Gets or sets the collection of namespaces to add to Web Pages pages in the current application.
179 | The collection of namespaces.
180 |
181 |
182 | Gets or sets the name of the page base type class.
183 | The name of the page base type class.
184 |
185 |
186 | Represents the name of the configuration section for Razor pages.
187 |
188 |
189 | Provides configuration system support for the system.web.webPages.razor configuration section.
190 |
191 |
192 | Initializes a new instance of the class.
193 |
194 |
195 | Represents the name of the configuration section for Razor Web section. Contains the static, read-only string "system.web.webPages.razor".
196 |
197 |
198 | Gets or sets the host value for system.web.webPages.razor section group.
199 | The host value.
200 |
201 |
202 | Gets or sets the value of the pages element for the system.web.webPages.razor section.
203 | The pages element value.
204 |
205 |
206 |
--------------------------------------------------------------------------------
/Source/bin/System.Web.Http.Common.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System.Web.Http.Common
5 |
6 |
7 |
8 | Provides extension methods for the class.
9 |
10 |
11 | Creates an wired up to the associated .
12 | An initialized .
13 | The HTTP request.
14 |
15 |
16 | Creates an wired up to the associated .
17 | An initialized .
18 | The HTTP request.
19 | The HTTP status code.
20 |
21 |
22 | The class can be used to indicate properties about a route parameter (the literals and placeholders located within segments of a ). It can for example be used to indicate that a route parameter is optional.
23 |
24 |
25 | Optional Parameter
26 |
27 |
28 | Returns a that represents this instance.
29 | A that represents this instance.
30 |
31 |
32 | Utility class for creating, logging and unwrapping instances.
33 |
34 |
35 | Creates an with the provided properties and logs it with .
36 | The logged .
37 | A composite format string explaining the reason for the exception.
38 | An object array that contains zero or more objects to format.
39 |
40 |
41 | Creates an with the provided properties and logs it with .
42 | The logged .
43 | The name of the parameter that caused the current exception.
44 | A composite format string explaining the reason for the exception.
45 | An object array that contains zero or more objects to format.
46 |
47 |
48 | Creates an with the provided properties and logs it with .
49 | The logged .
50 | The name of the parameter that caused the current exception.
51 |
52 |
53 | Creates an with the provided properties and logs it with .
54 | The logged .
55 | The name of the parameter that caused the current exception.
56 | A composite format string explaining the reason for the exception.
57 | An object array that contains zero or more objects to format.
58 |
59 |
60 | Creates an with a default message and logs it with .
61 | The logged .
62 | The name of the parameter that caused the current exception.
63 |
64 |
65 | Creates an with the provided properties and logs it with .
66 | The logged .
67 | The name of the parameter that caused the current exception.
68 | The value of the argument that causes this exception.
69 | A composite format string explaining the reason for the exception.
70 | An object array that contains zero or more objects to format.
71 |
72 |
73 | Creates an with a message saying that the argument must be less than or equal to maxValue and logs it with .
74 | The logged .
75 | The name of the parameter that caused the current exception.
76 | The value of the argument that causes this exception.
77 | The maximum size of the argument.
78 |
79 |
80 | Creates an with a message saying that the argument must be greater than or equal to minValue and logs it with .
81 | The logged .
82 | The name of the parameter that caused the current exception.
83 | The value of the argument that causes this exception.
84 | The minimum size of the argument.
85 |
86 |
87 | Creates an with a message saying that the argument must be an absolute URI without a query or fragment identifier and then logs it with .
88 | The logged .
89 | The name of the parameter that caused the current exception.
90 | The value of the argument that causes this exception.
91 |
92 |
93 | Creates an with a message saying that the argument must be an absolute URI and logs it with .
94 | The logged .
95 | The name of the parameter that caused the current exception.
96 | The value of the argument that causes this exception.
97 |
98 |
99 | Creates an with a message saying that the argument must be an "http" or "https" URI and logs it with .
100 | The logged .
101 | The name of the parameter that caused the current exception.
102 | The value of the argument that causes this exception.
103 |
104 |
105 | Unwraps and logs an as using <typeparamref name="TPreferredException" /> as the preferred unwrapped to return.
106 | The unwrapped and logged exception.
107 | The to unwrap and log
108 | The preferred to unwrap. If not present then the first is returned instead.
109 |
110 |
111 | Unwraps and logs an as .
112 | The unwrapped and logged exception.
113 | The exception to unwrap and log
114 |
115 |
116 | Unwraps and logs an as using <typeparamref name="TPreferredException" /> as the preferred unwrapped to return.
117 | The unwrapped and logged exception.
118 | The to unwrap and log
119 | The preferred to unwrap. If not present then the first is returned instead.
120 |
121 |
122 | Unwraps and logs an as .
123 | The unwrapped and logged exception.
124 | The exception to unwrap and log
125 |
126 |
127 | Unwraps and logs an as using <typeparamref name="TPreferredException" /> as the preferred unwrapped to return.
128 | The unwrapped and logged exception.
129 | The to unwrap and log
130 | The preferred to unwrap. If not present then the first is returned instead.
131 |
132 |
133 | Unwraps and logs an as .
134 | The unwrapped and logged exception.
135 | The exception to unwrap and log
136 |
137 |
138 | Unwraps and logs an as using <typeparamref name="TPreferredException" /> as the preferred unwrapped to return.
139 | The unwrapped and logged exception.
140 | The to unwrap and log
141 | The preferred to unwrap. If not present then the first is returned instead.
142 |
143 |
144 | Unwraps and logs an as .
145 | The unwrapped and logged exception.
146 | The exception to unwrap and log
147 |
148 |
149 | Formats the specified resource string using .
150 | The formatted string.
151 | A composite format string.
152 | An object array that contains zero or more objects to format.
153 |
154 |
155 | Creates an and logs it with .
156 | The logged .
157 | The name of the parameter that caused the current exception.
158 | The value of the argument that failed.
159 | A that represents the enumeration class with the valid values.
160 |
161 |
162 | Creates an and logs it with .
163 | The logged .
164 | Inner exception
165 | A composite format string explaining the reason for the exception.
166 | An object array that contains zero or more objects to format.
167 |
168 |
169 | Creates an and logs it with .
170 | The logged .
171 | A composite format string explaining the reason for the exception.
172 | An object array that contains zero or more objects to format.
173 |
174 |
175 | Creates an with a message saying that the key was not found and logs it with .
176 | The logged .
177 |
178 |
179 | Creates an with a message saying that the key was not found and logs it with .
180 | The logged .
181 | A composite format string explaining the reason for the exception.
182 | An object array that contains zero or more objects to format.
183 |
184 |
185 | Creates an and logs it with .
186 | The logged .
187 | A composite format string explaining the reason for the exception.
188 | An object array that contains zero or more objects to format.
189 |
190 |
191 | Creates an initialized according to guidelines and logs it with .
192 | The logged .
193 | A composite format string explaining the reason for the exception.
194 | An object array that contains zero or more objects to format.
195 |
196 |
197 | Creates an initialized with the provided parameters and logs it with .
198 | The logged .
199 |
200 |
201 | Creates an initialized with the provided parameters and logs it with .
202 | The logged .
203 | A composite format string explaining the reason for the exception.
204 | An object array that contains zero or more objects to format.
205 |
206 |
207 | Creates an with the provided properties and logs it with .
208 | The logged .
209 |
210 |
211 | Various helper methods for the static members of .
212 |
213 |
214 | Gets the static instance for any given HTTP method name.
215 | An existing static or a new instance if the method was not found.
216 | The HTTP request method.
217 |
218 |
219 | General purpose logging interface.
220 |
221 |
222 |
223 | Logs the given exception at the given level under the given category.
224 | The category under which to log the message. It can be empty but it cannot be null.
225 | The at which to log the exception.
226 | The to log. It cannot be null.
227 |
228 |
229 |
--------------------------------------------------------------------------------
/Source/Scripts/jquery.validate.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Note: While Microsoft is not the author of this script file, Microsoft
3 | * grants you the right to use this file for the sole purpose of either:
4 | * (i) interacting through your browser with the Microsoft website, subject
5 | * to the website's terms of use; or (ii) using the files as included with a
6 | * Microsoft product subject to the Microsoft Software License Terms for that
7 | * Microsoft product. Microsoft reserves all other rights to the files not
8 | * expressly granted by Microsoft, whether by implication, estoppel or
9 | * otherwise. The notices and licenses below are for informational purposes
10 | * only.
11 | *
12 | * Provided for Informational Purposes Only
13 | * MIT License
14 | *
15 | * Permission is hereby granted, free of charge, to any person obtaining a
16 | * copy of this software and associated documentation files (the "Software"),
17 | * to deal in the Software without restriction, including without limitation
18 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 | * and/or sell copies of the Software, and to permit persons to whom the
20 | * Software is furnished to do so, subject to the following conditions:
21 | *
22 | * The copyright notice and this permission notice shall be included in all
23 | * copies or substantial portions of the Software.
24 | *
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 | * DEALINGS IN THE SOFTWARE.
32 | *
33 | * jQuery Validation Plugin 1.8.1
34 | *
35 | * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
36 | * http://docs.jquery.com/Plugins/Validation
37 | *
38 | * Copyright (c) 2006 - 2011 Jörn Zaefferer
39 | *
40 | */
41 | (function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("").attr("name",
42 | b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
43 | else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
44 | return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
45 | b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
46 | validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
47 | onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
48 | a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
49 | minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/,
50 | "");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules;
51 | c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",
52 | [this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,
53 | a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},
54 | objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==
55 | a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,
56 | this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=
57 | c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=
58 | this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+
59 | a.name+"")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];
60 | this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);
61 | this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||
62 | "");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},
63 | idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},
64 | depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<
65 | 0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},
66 | email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b=
67 | {};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===
68 | false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&
69 | a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},
70 | methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=
71 | e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=
72 | e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||
73 | a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)},
74 | url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
75 | date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
76 | 0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
77 | (function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
78 | (function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
79 | b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);
80 |
--------------------------------------------------------------------------------
/Source/Scripts/knockout-2.0.0.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Note: While Microsoft is not the author of this script file, Microsoft
3 | * grants you the right to use this file for the sole purpose of either:
4 | * (i) interacting through your browser with the Microsoft website, subject
5 | * to the website's terms of use; or (ii) using the files as included with a
6 | * Microsoft product subject to the Microsoft Software License Terms for that
7 | * Microsoft product. Microsoft reserves all other rights to the files not
8 | * expressly granted by Microsoft, whether by implication, estoppel or
9 | * otherwise. The notices and licenses below are for informational purposes
10 | * only.
11 | *
12 | * Provided for Informational Purposes Only
13 | * MIT License
14 | *
15 | * Permission is hereby granted, free of charge, to any person obtaining a
16 | * copy of this software and associated documentation files (the "Software"),
17 | * to deal in the Software without restriction, including without limitation
18 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 | * and/or sell copies of the Software, and to permit persons to whom the
20 | * Software is furnished to do so, subject to the following conditions:
21 | *
22 | * The copyright notice and this permission notice shall be included in all
23 | * copies or substantial portions of the Software.
24 | *
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 | * DEALINGS IN THE SOFTWARE.
32 | */
33 | // Knockout JavaScript library v2.0.0
34 | // (c) Steven Sanderson - http://knockoutjs.com/
35 | // License: MIT (http://www.opensource.org/licenses/mit-license.php)
36 |
37 | (function(window,undefined){
38 | function c(a){throw a;}var l=void 0,m=!0,o=null,p=!1,r=window.ko={};r.b=function(a,b){for(var d=a.split("."),e=window,f=0;f",b[0];);return 4r.a.k(e,a[b])&&e.push(a[b]);return e},ba:function(a,e){for(var a=a||[],b=[],f=0,d=a.length;fa.length?p:a.substring(0,e.length)===e},hb:function(a){for(var e=Array.prototype.slice.call(arguments,1),b="return ("+a+")",f=0;f",""]||!d.indexOf("