Search Results

Search found 1431 results on 58 pages for 'richard castle'.

Page 5/58 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • [Castle Dynamic Proxy] What really interceptors do with my c# class?

    - by Pandiya Chendur
    I was asked to implement castle dynamic proxy in my asp.net web application and i was going through couple of articles which i got from Castle Project and Code Project about castle dynamic proxy in asp.net web application.... Both articles delt with creating interceptors but i can't get the idea why interceptors are used with classes.... Why should i intercept my class which is behaving properly?

    Read the article

  • How do I pass dependency to object with Castle Windsor and MS Test?

    - by Nick
    I am trying to use Castle Windsor with MS Test. The test class only seems to use the default constructor. How do I configure Castle to resolve the service in the constructor? Here is the Test Class' constructors: private readonly IWebBrowser _browser; public DepressionSummaryTests() { } public DepressionSummaryTests(IWebBrowser browser) { _browser = browser; } My component in the app config looks like so: <castle> <components> <component id="browser" service="ConversationSummary.IWebBrowser, ConversationSummary" type="ConversationSummary.Browser" /> </components> </castle> Here is my application container: public class ApplicationContainer : WindsorContainer { private static IWindsorContainer container; static ApplicationContainer() { container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle"))); } private static IWindsorContainer Container { get { return container; } } public static IWebBrowser Browser { get { return (IWebBrowser) Container.Resolve("browser"); } } } MS test requires the default constructor. What am I missing? Thanks!

    Read the article

  • [Castle-DynamicProxy] What really interceptors do with my c# class?

    - by Pandiya Chendur
    I was asked to implement castle dynamic proxy in my asp.net web application and i was going through couple of articles which i got from Castle Project and Code Project about castle dynamic proxy in asp.net web application.... Both articles delt with creating interceptors but i can't get the idea why interceptors are used with classes.... Why should i intercept my class which is behaving properly?

    Read the article

  • DI/IoC in Java for a .NET'er used to Castle.Windsor

    - by Ciddan
    Is there a Java DI container that works in a similar way to the most excellent Castle.Windsor container on the .NET side? The Java containers I've had a look at all seem to rely on annotations (Guice) within my services, which I don't dig all that much - I'd like to go POJO all the way if possible. Spring on the other hand can do without the annotations, but it requires a lot of XML. XML configuration != maintainability. One of the really nice things about Castle.Windsor is the wiring you're able to set up in code with Installers, auto wiring based on naming conventions and whatnot. Ideally the container should also support lifecycle management and configuration; i.e. registering components as transient, singleton, pooled etc. Another bonus would be support for interceptors. Any tips would be greatly appreciated.

    Read the article

  • Registering IWindsorContainer with ASPNET MVC 2.0 Areas

    - by Bernard Larouche
    I had the following code that was working well before the addition of Areas in MVC 2 : protected override IWindsorContainer CreateContainer(string windsorConfig) { IWindsorContainer container = new WindsorContainer(); container.Register(Component.For<IUnitOfWorkFactory>() .ImplementedBy<NHibernateUnitOfWorkFactory>()); container.Register(AllTypes.Of<IController>() .FromAssembly(typeof(HomeController).Assembly) .Configure(t => t.Named(t.Implementation.Name.ToUpper()) .LifeStyle.Is(LifestyleType.Transient))); return container; } It doesn't work anymore with MVC 2.0 Areas feature. Could you guide me through a possible solution Thanks

    Read the article

  • Windsor Method interception (AOP)

    - by Allan
    Hi there guys, I'm trying to create interceptors for specific methods but I'm having a hard time. I can't bind an aspect to a specific method. I create the faicilities most of examples show but it still doesn't work. Can anyone give me an example of how to do this? I prefer xml conifguration, if possible. Another question, I have this code: <component id="SampleAspect" service="WindsorSample.Aspect.SampleAspect, WindsorSample" type="WindsorSample.Aspect.SampleAspect, WindsorSample"> </component> <component id="HtmlTitleRetriever" type="WindsorSample.DummyObject, WindsorSample"> <parameters> <interceptors> <interceptor>${SampleAspect}</interceptor> </interceptors> </parameters> </component> Then... IWindsorContainer container = new WindsorContainer(new XmlInterpreter()); IDummyObject retriever = container.Resolve<DummyObject>(); retriever.SomeMethod(); This aspect is not executed. Am I missing something? Am I using the wrong approach for aop? Thanks

    Read the article

  • How do you install Castle Windsor IOC?

    - by user300266
    I'm currently reading Pro ASP.NET MVC Framework by Sanderson. In the book he recommends setting up IoC using Castle Windsor, and he points out that the download automatically installs it and registers the Castle DLLs in the GAC. Well, at this point in time (5/4/2010), the Castle Project no longer has a downloadable installer that sets this up. Its all broken out into their individual subprojects with the raw files contained in zipped folders. Sadly there's no installation documentation that I can find about how to set it up. Being the noob that I am, I'm stuck and now forced to ask #1 where should castle windsor live on my hard drive? #2 how do I manually register the dlls properly? And, #3 should I be angry at the project maintainers for their oversight? Here's the link: http://www.castleproject.org/castle/download.html

    Read the article

  • How can I inject an object into an WCF IErrorHandler implementation with Castle Windsor?

    - by Michael Johnson
    I'm developing a set of services using WCF. The application is doing dependency injection with Castle Windsor. I've added an IErrorHandler implementation that is added to services via an attribute. Everything is working thus far. The IErrorHandler object (of a class called FaultHandler is being applied properly and invoked. Now I'm adding logging. Castle Windsor is set up to inject the logger object (an instance of IOurLogger). This is working. But when I try to add it to FaultHandler my logger is null. The code for FaultHandler looks something like this: class FaultHandler : IErrorHandler { public IOurLogger logger { get; set; } public bool HandleError(Exception error) { logger.Write("Exception type {0}. Message: {1}", error.GetType(), error.Message); // Let WCF handle things its way. We only want to log. return false; } public void ProvideFault(Exception error, MessageVersion version, Message fault) { } } This throws it's own exception, since logger is null when HandleError() is called. The logger is being successfully injected into the service itself and is usable there, but for some reason I can't use it in FaultHandler. Update: Here is the relevant part of the Windsor configuration file (edited to protect the innocent): <configuration> <components> <component id="Logger" service="Our.Namespace.IOurLogger, Our.Namespace" type="Our.Namespace.OurLogger, Our.Namespace" /> </components> </configuration>

    Read the article

  • Using Castle DynamicProxy is it possible to change the invocation target on class proxy?

    - by Gareth D
    Hi Using Castle DynamicProxy v2, I'd like to change the target of an invocation for a class proxy. The new target is simply a different instance of the same type as the original target. The target types do not implement a common interface so I cannot use the IProxyTargetAccessor as detailed in Krzysztof's post on the subject - I cannot cast from a class proxy invocator to a IProxyTargetAccessor. Is there a way to do this?

    Read the article

  • Castle Dynamic Proxy is it possible to intercept value types?

    - by JS Future Software
    Hi, I have a problem and can not find answer and any tip if it is possible to intercept value types in C# by Castle dynamic proxy? I want to intercept IDictionary with INotifyChanged interface. I need this to update view when presenter is changing model. Boxing decimal in object only for making interface is not good idea... maybe somebody have idea how to intrcept value types? Thanks to all answers

    Read the article

  • How to use Linq with Castle ActiveRecord

    - by Ronnie Overby
    I am playing around with Castle ActiveRecord and noticed that the download included the file, Castle.ActiveRecord.Linq.dll. I haven't found any documentation for using Linq with ActiveRecord, only some old blog posts. What is the usage pattern? Is Castle.ActiveRecord.Linq ready for production use? I'm using reflector, pending an answer.

    Read the article

  • Chambers In A Castle Algorithm

    - by 7Aces
    Problem Statement - Given a NxM grid of 1s & 0s (1s mark walls, while 0s indicate empty chambers), the task is to identify the number of chambers & the size of the largest. And just to whet my curiosity, to find in which chamber, a cell belongs. It seems like an ad hoc problem, since the regular algorithms just don't fit in. I just can't get the logic for writing an algorithm for the problem. If you get it, pseudo-code would be of great help! Note - I have tried the regular grid search algorithms, but they don't suffice the problem requirements. Source - INOI Q Paper 2003

    Read the article

  • What is the equivalent of <composite-element> in Castle ActiveRecord?

    - by Daniel T.
    I have a TrackLog that has a collection of TrackPoints: public class TrackLog { public string Name { get; set; } public ISet<TrackPoint> TrackPoints { get; set; } } public class TrackPoint { public DateTime Timestamp { get; set; } public double Latitude { get; set; } public double Longitude { get; set; } } I'd like to map the track points as a collection of components, as this makes the most sense. According to the book NHibernate in Action, on page 187: Collections of components are mapped similarily to other collections of value type instances. The only difference is the use of <composite-element> in place of the familiar <element> tag. How would I do this using Castle ActiveRecord attributes?

    Read the article

  • Can I tell Castle Windsor to create a component in a separate AppDomain?

    - by Michael L Perry
    I've created a multi-threaded service that uses Castle Windsor to create components to run on separate threads. I Resolve an component by name with parameters for each thread. I'm running into concurrency problems with a 3rd party library used by the components. I suspect that isolating those components in separate AppDomains will resolve the problem. Is there a way to have Resolve create the component using a different AppDomain? private ActivityThread NewActivityThread(ActivityInstance activityInstance) { // Set up the creation arguments. System.Collections.IDictionary arguments = new Dictionary<string, string>(); activityInstance.Parameters.ForEach(p => arguments.Add(p.Name, p.Value)); // Get the activity handler from the container. IActivity activity = Program.Container.Resolve<IActivity>(activityInstance.Name, arguments); // Create a thread for the activity. ActivityThread thread = new ActivityThread(activity, activityInstance, _nextActivityID++); return thread; } public ActivityThread(IActivity activity, ActivityInstance instance, int id) { _activity = activity; _instance = instance; _id = id; } public void Start() { if (_thread == null) { // Create a new thread to run this activity. _thread = new Thread(delegate() { _activity.Run(); }); _thread.Name = _activity.ToString(); _thread.SetApartmentState(ApartmentState.STA); _thread.Start(); } }

    Read the article

  • Tulsa Dot Net Rocks

    - by dmccollough
    Carl Franklin & Richard Campbell of .NET Rocks are taking their show on the road and are going to make a stop in Tulsa Oklahoma on Wednesday April 28th, 2010. This event will be from 6:00 PM until 9:00 PM. This is a FREE EVENT, with FREE FOOD and FREE SWAG. They are also going to be bringing a special surprise guest speaker (It could be Scott Hanselman, Scott Guthrie, Don Box, Billy Hollis, Dan Appleman or …)   Broken Arrow North Auditorium 808 East College Street   Please visit the Tulsa Developers .NET web site for updated information as it becomes available.   Register by going to this link.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >