This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class BootstrapperExtensions | |
{ | |
public static void WithSession(this IPipelines pipeline, IDictionary<string, object> session) | |
{ | |
pipeline.BeforeRequest.AddItemToEndOfPipeline(ctx => | |
{ | |
ctx.Request.Session = new Session(session); | |
return null; | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.webServer> | |
<handlers> | |
<add name="iisnode" path="app.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<iisnode loggingEnabled="false" debuggingEnabled="true" debuggerPathSegment="debug" /> | |
<rewrite> | |
<rules> | |
<clear /> | |
<rule name="Debug" patternSyntax="Wildcard" stopProcessing="true"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NonAction] | |
protected ActionResult WrapDataTableQuery<T>(IQueryable<T> data, Func<string, Expression<Func<T, bool>>> filter, Func<IQueryable<T>, string, bool, IOrderedQueryable<T>> applyOrderingFunction, Func<T, object[]> decorator) | |
{ | |
// Fetch query parameters from the form buffer. All queries are POSTs | |
var queryData = ParseDataTableQueryDetails(); | |
if (!String.IsNullOrWhiteSpace(queryData.SearchTerm)) | |
{ | |
data = data.Where(filter(queryData.SearchTerm.ToLower())); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createPerson(name) { | |
var _name = name; | |
return { | |
sayHello: function () { | |
console.log("Hello " + _name); | |
} | |
} | |
} | |
var sue = createPerson('sue'); | |
var bill = createPerson('bill'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Person.js | |
(function () { | |
var Person = WinJS.Class.define(function (name) { | |
this.name = name; | |
}, { | |
sayHello: function () { | |
console.log("Hello " + this.name); | |
} | |
}, { | |
createPerson: function (name) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Person = (function() { | |
var ctor = function(name) { | |
var _name = name; | |
this.get_name = function() { return _name; } // Wrap the private variable with a getter | |
}; | |
ctor.prototype.sayHello = function () { | |
console.log("Hello " + this.get_name()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Person = function (name) { | |
this.name = name; | |
}; | |
Person.prototype.sayHello = function () { | |
console.log("Hello " + this.name); | |
} | |
var sue = new Person('sue'); | |
sue.sayHello(); // prints Hello sue | |
var bill = new Person('bill'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createPerson(name) { | |
return { | |
name: name, | |
sayHello: function () { | |
console.log("Hello " + this.name); | |
} | |
} | |
} | |
var sue = createPerson('sue'); | |
var bill = createPerson('bill'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dm = $.fn.domManip; | |
$.fn.domManip = function (a, b, c) { | |
var result; | |
var that = this; | |
MSApp.execUnsafeLocalFunction(function () { | |
result = dm.call(that, a, b, c); | |
}); | |
return result; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_CopyOutOfDateSourceItemsToOutputDirectoryAlways: | |
Creating directory "D:\temp\vxyr2fjf.bf2\output\app\node_modules\node-logentries". | |
Copying file from "D:\temp\vxyr2fjf.bf2\input\NodeWorkerRunner\app\node_modules\node-logentries\package.json" to "D:\temp\vxyr2fjf.bf2\output\app\node_modules\node-logentries\package.json". | |
Copying file from "D:\temp\vxyr2fjf.bf2\input\NodeWorkerRunner\app\node_modules\node-logentries\README.md" to "D:\temp\vxyr2fjf.bf2\output\app\node_modules\node-logentries\README.md". | |
Copying file from "D:\temp\vxyr2fjf.bf2\input\NodeWorkerRunner\app\index.js" to "D:\temp\vxyr2fjf.bf2\output\app\index.js". | |
Creating directory "D:\temp\vxyr2fjf.bf2\output\app\node_modules\node-logentries\lib". | |
Copying file from "D:\temp\vxyr2fjf.bf2\input\NodeWorkerRunner\app\node_modules\node-logentries\lib\logentries.js" to "D:\temp\vxyr2fjf.bf2\output\app\node_modules\node-logentries\lib\logentries.js". |