public void UsePaymentService() { var paymentService = paymentServiceFactory.Create(); paymentService.Start(); Program.PretendToPublish(); paymentServiceFactory.Release(paymentService); paymentServiceFactory.Dispose(); }
public void RegisteringDelegates() { var container = new WindsorContainer().Install(FromAssembly.This()); var now = container.Resolve <Func <DateTime> >(); Console.Out.WriteLine("now() = {0}", now()); var paymentService = container.Resolve <IPaymentService>(); paymentService.Start(); Program.PretendToPublish(); }