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
var container = new WindsorContainer(); | |
var nhfacilityRegistration = new NHFacilityRegistration(conf => | |
conf | |
.Id("FacilityId") | |
.DefaultConfigurationPersister("mykey") | |
.AddFactory(x => x | |
.Alias("myAlias") | |
.Id("myId") | |
.UsingConfigurationPersister("persister") | |
.UsingConfigurationBuilder |
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
windsorContainer.Register( | |
NHibernateIntegration | |
.Configure(config => | |
config | |
.ProxyFactory<ProxyFactoryFactory>() | |
.Dialect<MsSql2008Dialect>() | |
.Provider<DriverConnectionProvider>() | |
.ConnectionString(connString) | |
.Driver<SqlClientDriver>() | |
.CreateFactory(factory => |
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
/// <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> |
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
IWindsorContainer container=null; | |
container.Register( | |
Fluently.ConfigureFacility() | |
.Id("nhibernateFacility") | |
.DefaultConfigurationBuilder<DefaultConfigurationBuilder>() | |
.DefaultConfigurationPersister<DefaultConfigurationPersister>() | |
.AddFactory( | |
Fluently.ConfigureFactory() | |
.Alias("myAlias") | |
.Id("myId") |
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
/* | |
* Reference.h | |
* | |
* Created on: Mar 28, 2010 | |
* Author: tehlike | |
*/ | |
#include "../Threading/Mutex.h" | |
#ifndef REFERENCE_H_ | |
#define REFERENCE_H_ | |
template <typename T> |
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
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. | |
""" |
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 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); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication2 | |
{ | |
using System.Runtime.Serialization; | |
class Thing1 |
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
//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 |
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
[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"); |
NewerOlder