This file contains 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 listener = new Listener(); | |
var factory = new AutoContextFactory(); | |
DependencyResolver.Bind<IContext>().To(x => factory.Context()).OnActivation(x => x.SavingChanges => (sender, args) => { | |
foreach (var entry in args.Context.ChangeTracker.Entries().Where(x => x.State == EntityState.Added)) | |
listener.InsertEventListener(entry); | |
foreach (var entry in args.Context.ChangeTracker.Entries().Where(x => x.State == EntityState.Modified)) | |
listener.UpdateEventListener(entry); | |
foreach (var entry in args.Context.ChangeTracker.Entries().Where(x => x.State == EntityState.Deleted)) |
This file contains 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($) { | |
$.fn.filterTable = function (targets, options) { | |
var settings = $.extend({ | |
className: 'hidden', | |
matchAll:true | |
}, options); | |
var targetTable = $(this); | |
$(targets).each(function () { |
This file contains 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 object Limit(object o, int level) | |
{ | |
if (level <= 0) | |
return null; | |
PropertyInfo[] properties = o.GetType().GetProperties(); | |
foreach (var property in properties) | |
{ | |
if (property.PropertyType.IsClass && property.CanWrite && property.PropertyType is IEnumerable) |
This file contains 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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="Security.cs" company=""> | |
// | |
// </copyright> | |
// <summary> | |
// Class to manage security functions, such as Base64 encode/decode, SHA encryption, etc. | |
// Requires the Random String Generator class. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- |
This file contains 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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="AllowAnonymousAttribute.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Extra attribute to allow making all methods apart from those tagged "AllowAnonymous" to be requiring authorization | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.Filters |
This file contains 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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="HtmlHelpers.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// HTML Helpers | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.HtmlHelpers |
This file contains 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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="MultiViewController.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Defines the MultiViewController type. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.Infrastructure |
This file contains 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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="NinjectDependencyResolver.cs" company=""> | |
// Nero Sule | |
// </copyright> | |
// <summary> | |
// Dependency Injection | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Web.Infrastructure |
This file contains 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 ($) { | |
/** | |
* jQuery extension to parse hash (#) in url, | |
* fill in values of input boxes with the specific ID's, | |
* and automatically update the values on address bar by | |
* monitoring the change/keyup events. | |
*/ | |
$.fn.autohash = function () { | |
// This extension is chainable |
OlderNewer