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 override void OnBeginRequest(HttpContextBase context, IWindsorContainer container) | |
{ | |
var parameters = new Arguments(new | |
{ | |
response = context.Response, | |
pdfFormatter = container.Resolve<IFormatPdfResponse>() | |
}); | |
container.Resolve | |
<IDispatchPdfReponses>(parameters) |
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($) { | |
'use strict'; | |
// 1. Zwei requests parallel abstimmen | |
// 2. Für jedes Request ein callback auslösen | |
// 3. Wenn beide callbacks abgeschlossen sind, soll ein drittes ausgelöst | |
// werden. | |
var rq1 = firstRequest() |
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
#!/bin/sh | |
# | |
# Usage | |
# workOnIssue <issue-number> | |
# | |
# Sample | |
# workOnIssue issue-999 | |
# | |
function workOnIssue() { |
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
-Dhttp.proxyHost=<HTTP_PROXY> | |
-Dhttp.proxyPort=<HTTP_PROXY_PORT> | |
-Dhttps.proxyHost=<HTTPS_PROXY> | |
-Dhttps.proxyPort=<HTTPS_PROXY_PORT> | |
-Dhttp.nonProxyHosts="localhost|127.0.0.1|<OTHER>" | |
-Dhttps.nonProxyHosts="localhost|127.0.0.1|<OTHER>" |
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 class SeeThatRepository | |
{ | |
private ISession _session; | |
public SeeThatRepository(ISession session) | |
{ | |
_session = session; | |
} | |
public void Save(T entity) |
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 class EntityOperation : IEntityOperation | |
{ | |
readonly ISession _session; | |
public EntityOperation(ISession session) | |
{ | |
_session = session; | |
} | |
public void Save(object entity) |
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 HttpResponseMessage Get(int id) | |
{ | |
return CustomerRepository.GetBy(id) | |
.Match( | |
c => Request.CreateResponse( | |
HttpStatusCode.Found, | |
c), | |
() => Request.CreateErrorResponse( | |
HttpStatusCode.NotFound, | |
String.Format("There is no customer having the ID '{0}'", id))); |
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 HttpResponseMessage Get(int id) | |
{ | |
HttpResponseMessage response; | |
var customer = CustomerRepository.GetBy(id); | |
if (customer == null) | |
response = Request.CreateErrorResponse( | |
HttpStatusCode.NotFound, | |
string.Format("There is no customer having the ID '{0}'", id)); | |
else |
NewerOlder