Skip to content

Instantly share code, notes, and snippets.

View andreasohlund's full-sized avatar

Andreas Öhlund andreasohlund

View GitHub Profile
/// <summary>
/// Used to instantiate types, so that all configured dependencies
/// and property values are set.
/// An abstraction on top of dependency injection frameworks.
/// </summary>
public interface IBuilder : IDisposable
{
/// <summary>
/// Creates an instance of the given type, injecting it with all defined dependencies.
/// </summary>
namespace NServiceBus.ObjectBuilder
{
/// <summary>
/// Used to configure components in the container.
/// Should primarily be used at startup/initialization time.
/// </summary>
public interface IConfigureComponents
{
/// <summary>
/// Configures the given type. Can be used to configure all kinds of properties.
namespace NServiceBus.ObjectBuilder
{
/// <summary>
/// Represent the various lifecycles available for coponents configured in the container
/// </summary>
public enum DependencyLifecycle
{
/// <summary>
/// The same instance will be returned each time
/// </summary>
$.ajax({
url: 'http://ipv4.fiddler:8080/indexes/dynamic/AuctionSummaryItems',
dataType: 'jsonp',
jsonp: 'jsonp',
success: function (data) {
$.each(data.Results, function () {
$("#auctions").append("<p>Description: " + this.Description + ", id: " + this.AuctionId + "</p>");});},
error: function (data) { alert('error'); }
});
@andreasohlund
andreasohlund / gist:965161
Created May 10, 2011 19:10
NServiceBus startup
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>$(ProjectDir)$(OutputPath)NServiceBus.Host.exe</StartProgram>
</PropertyGroup>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Logging" type="NServiceBus.Config.Logging, NServiceBus.Core" />
</configSections>
<Logging Threshold="DEBUG" />
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core"/>
</configSections>
<UnicastBusConfig>
<MessageEndpointMappings>
<add Messages="Messages.Request, Messages" Endpoint="server" />
</MessageEndpointMappings>
@andreasohlund
andreasohlund / app.config
Created June 1, 2011 12:49
Exercise - 12: WcfConfig
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ISecurityService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
@andreasohlund
andreasohlund / web.config
Created June 1, 2011 12:50
Exercise 12- Web
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core"/>
<section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core"/>
</configSections>
<MsmqTransportConfig InputQueue="web" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5" />
<UnicastBusConfig>
@andreasohlund
andreasohlund / key.xml
Created June 1, 2011 13:11
Exercise 11 - Key
<section name="RijndaelEncryptionServiceConfig" type="NServiceBus.Config.RijndaelEncryptionServiceConfig, NServiceBus.Core"/>
Then add the following to the both configuration files:
<RijndaelEncryptionServiceConfig Key="gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e7"/>