- Extensibility
- Conventionalize
- Improve reusability
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 class MoveCustomerCommandHandler : ICommandHandler<MoveCustomerCommand> | |
{ | |
private readonly ISession session; | |
public MoveCustomerCommandHandler(ISession session) | |
{ | |
this.session = session; | |
} | |
public void Handle(MoveCustomerCommand command) |
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
using System; | |
using Castle.DynamicProxy; | |
using NHibernate; | |
using IInterceptor = Castle.DynamicProxy.IInterceptor; | |
namespace Nebula.Bootstrapper.Interceptors | |
{ | |
public class AutoTxInterceptor : IInterceptor | |
{ | |
private readonly Lazy<ISession> session; |
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 container = new WindsorContainer() | |
// opt-in for Lazy | |
container.Register(Component.For<ILazyComponentLoader>() | |
.ImplementedBy<LazyOfTComponentLoader>()); | |
// Necessary session registration | |
// ... | |
// Bind lifestyle of to whom it is intercepting |
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
<h1>Modify your settings</h1> | |
@using (Html.BeginForm()) | |
{ | |
<div class="control-group"> | |
<label class="control-label">Birthdate</label> | |
<div class="controls"> | |
<div class="input-append"> | |
<input type="text" name="birthDate" id="birthDate" /> | |
<span class="add-on"> |
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
<input type="text" name="birthDate" id="birthDate" data-role="datepicker" /> |
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 ($) { | |
$(document).ready(function () { | |
//datepicker convention | |
$(':text[data-role="datepicker"]').datepicker({ | |
dateFormat: 'dd-mm-yy' | |
}); | |
}); | |
})(jQuery); |
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
const mongoose = require('mongoose'); | |
mongoose.connect('uri', { mongos: 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
[alias] | |
co = checkout | |
stat = status | |
[merge] | |
tool = p4merge | |
[mergetool "p4merge"] | |
keepTemporaries = false | |
prompt = false | |
trustExitCode = false |