Skip to content

Instantly share code, notes, and snippets.

var container = new WindsorContainer();
var nhfacilityRegistration = new NHFacilityRegistration(conf =>
conf
.Id("FacilityId")
.DefaultConfigurationPersister("mykey")
.AddFactory(x => x
.Alias("myAlias")
.Id("myId")
.UsingConfigurationPersister("persister")
.UsingConfigurationBuilder
windsorContainer.Register(
NHibernateIntegration
.Configure(config =>
config
.ProxyFactory<ProxyFactoryFactory>()
.Dialect<MsSql2008Dialect>()
.Provider<DriverConnectionProvider>()
.ConnectionString(connString)
.Driver<SqlClientDriver>()
.CreateFactory(factory =>
/// <summary>
/// Interface for the individual factory configuration
/// </summary>
public interface IFactoryConfiguration
{
/// <summary>
/// Sets the alias for the <see cref="ISessionFactory"/>
/// </summary>
/// <param name="alias">Alias for the factory</param>
/// <returns></returns>
IWindsorContainer container=null;
container.Register(
Fluently.ConfigureFacility()
.Id("nhibernateFacility")
.DefaultConfigurationBuilder<DefaultConfigurationBuilder>()
.DefaultConfigurationPersister<DefaultConfigurationPersister>()
.AddFactory(
Fluently.ConfigureFactory()
.Alias("myAlias")
.Id("myId")
/*
* Reference.h
*
* Created on: Mar 28, 2010
* Author: tehlike
*/
#include "../Threading/Mutex.h"
#ifndef REFERENCE_H_
#define REFERENCE_H_
template <typename T>
from visual import *
print """
Right button drag to rotate "camera" to view scene.
On a one-button mouse, right is Command + mouse.
Middle button to drag up or down to zoom in or out.
On a two-button mouse, middle is left + right.
On a one-button mouse, middle is Option + mouse.
"""
public class SimulationTimeSource : ITimeSource
{
private readonly LiveLab game;
private TimeSpan timeSpan;
public SimulationTimeSource(LiveLab game)
{
this.game = game;
this.timeSpan = new TimeSpan();
this.game.GameUpdated += (timeSpan) =>
this.timeSpan = timeSpan.Add(timeSpan);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
using System.Runtime.Serialization;
class Thing1
//DOES NOT SHOW THE USERNAME+HELLO IN THE username BOX
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string username)
{
ViewData["username"] = username + "helloo";
return View();
}
//DOES SHOW THE EMAIL+HELLO IN THE username BOX
[Test]
public void Can_register_handler_forwarding_with_keys()
{
IKernel kernel = new DefaultKernel();
kernel.Register(
Component.For<IRepository>()
.ImplementedBy<MyRepository>()
.Named("myComponent")
);
kernel.RegisterHandlerForwarding("newComponent","myComponent");