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
| namespace Core | |
| { | |
| public interface IResolver | |
| { | |
| T Resolve<T>(); | |
| } | |
| } |
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
| namespace Core | |
| { | |
| using Castle.Windsor; | |
| public static class ServiceLocator | |
| { | |
| public static IWindsorContainer Container { get; set; } | |
| } | |
| } |
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
| namespace Web.Profiles.DomainToViewModel | |
| { | |
| using System.Linq; | |
| using System.Reflection; | |
| using AutoMapper; | |
| using Core.Extensions; | |
| public partial class DomainToViewModel : Profile |
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
| [Test] | |
| public void ActionReturnsRedirectToRouteResult() | |
| { | |
| var result = this.controller.Action(); | |
| Assert.That(result, Is.TypeOf<RedirectToRouteResult>()); | |
| var routeResult = (RedirectToRouteResult)result; | |
| Assert.That(routeResult.RouteValues["area"], Is.EqualTo(string.Empty)); |
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
| namespace Web.Tests.TestHelpers | |
| { | |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Security.Principal; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using System.Web.Routing; |
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 App = App || { }; | |
| (function (factory) { | |
| 'use strict'; | |
| if (typeof define === 'function' && define.amd) { | |
| // Register as an anonymous AMD module: | |
| define([ | |
| 'jquery', | |
| 'App' | |
| ], factory); |
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 App = App || {}; | |
| (function (factory) { | |
| 'use strict'; | |
| if (typeof define === 'function' && define.amd) { | |
| // Register as an anonymous AMD module: | |
| define([ | |
| App | |
| ], factory); | |
| } else { |
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 App = { namespace: 'foo' }; | |
| (function (factory) { | |
| 'use strict'; | |
| if (typeof define === 'function' && define.amd) { | |
| // Register as an anonymous AMD module: | |
| define([ | |
| 'jquery' | |
| , 'jqueryui' | |
| , App |
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
| Date.prototype.formatDDMMYYYY = function () { | |
| return ('0' + this.getDate()).slice(-2) + | |
| '/' + ('0' + (this.getMonth() + 1)).slice(-2) + | |
| '/' + this.getFullYear(); | |
| }; | |
| Date.prototype.formatDDMMYYYYWithHMS = function () { | |
| return ('0' + this.getDate()).slice(-2) + | |
| '/' + ('0' + (this.getMonth() + 1)).slice(-2) + | |
| '/' + this.getFullYear() + |
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
| Number.prototype.formatMoney = function (c, d, t) { | |
| var n = this, | |
| s = n < 0 ? "-" : "", | |
| j = (j = i.length) > 3 ? j % 3 : 0; | |
| c = isNaN(c = Math.abs(c)) ? 2 : c, | |
| d = d === undefined ? "," : d, | |
| t = t === undefined ? "." : t, | |
| var i = parseInt(n = Math.abs(+n || 0).toFixed(c), 10) + ""; |