Questions tagged [castle]

Castle is an open source project for .net that aspires to simplify the development of enterprise and web applications.

Castle is an open source project for .net that aspires to simplify the development of enterprise and web applications. Offering a set of tools (working together or independently) and integration with others open source projects, Castle helps you get more done with less code and in less time.

Castle subprojects include:

Other smaller projects also exist, notably

383 questions
7
votes
4 answers

How to detect if a Type is a generated DynamicProxy without referencing Castle DynamicProxy?

I am using castle DynamicProxy and was wondering if there is a way of detecting if a Type is a proxy without referencing Castle DynamicProxy? So while I am using Castle DynamicProxy as an example I would like code that would work for any in memory…
Simon
  • 33,714
  • 21
  • 133
  • 202
6
votes
1 answer

Do I need svc file to setup Castle Wcf Facility for non-HTTP services

I am confused about the castle wcf facility registration. I read some blog posts for BasicHttpBinding. But could not find a clear easy sample to setup a net.tcp setup. I want to host the service from a console application... I wrote something like…
Serdar
  • 1,416
  • 2
  • 17
  • 43
6
votes
2 answers

How to register Ef core db context with Castle windsor?

I " ve got a project under .net core. I want to register Ef Core Context with Castle windosr But I couldn 't find a solution to EfCore Wireup context in .net core. Thank you.
John
  • 189
  • 1
  • 9
6
votes
1 answer

Using Castle.Windsor to register an interceptor for only the derived class, not the base class

I am working on upgrading our project from .Net 2 to .Net4.5, at the same time I'm pushing as many references as I can to NuGet and making sure the versions are current. I am having a problem getting one of the tests to run The Test Classes: …
user1618236
5
votes
1 answer

NuGet: NHibernate, Castle.Core 3.0 and where is ProxyFactoryFactory?

I installed with NuGet the packages NHibernate and Castle.Core 3.0 for a new project. Usually we copied around the dlls manually; it is the first time I do that with NuGet. Now I can't find out how to configure the ProxyFactoryFactory, or let's say,…
sl3dg3
  • 5,026
  • 12
  • 50
  • 74
5
votes
1 answer

How to resolve Castle.Windsor and MoQ version conflicts for Castle.Core assembly

In my project I need to use simultaneously Castle.Windsor and Moq dlls. Windsor requires Castle.Core also to be referenced in the project. Problem starts when I try to use methods from…
Andris
  • 1,262
  • 1
  • 15
  • 24
5
votes
1 answer

Performance advice for using Castle DynamicProxy in .NET web-apps

I am starting out with Castle DynamicProxy and I have this sample to track changes to properties of an object. Questions: Should I cache (in a static field) the ProxyGenerator() instance I use in AsTrackable()? I going to use in an ASP.NET…
Raghu Dodda
  • 1,505
  • 1
  • 21
  • 28
5
votes
1 answer

injecting connection strings to DI resolved classes

I am using Castle to create my database context based on a given interface. I have the following code in my Installer class and this works fine at the moment. private ConfigureDelegate ConfigureContext() { return p =>…
Adam Stewart
  • 1,983
  • 1
  • 18
  • 25
5
votes
1 answer

Configuring Castle Windsor using xml/app.config

I am currently building a sample application using Castle Windsor. The motto is to use xml/app.config to switch method interception on/off. I had used the Fluent API earlier and it worked as a charm. As the next step, I am trying to replace the…
user2930995
  • 63
  • 1
  • 4
5
votes
2 answers

NHibernate 2.1.2 in medium trust

I'm trying to configure nhibernate 2.1.2 to run in medium trust, without any luck. I have tried follwing the suggestions to run in medium trust and pre-generating the proxies. I then tried to remove all references to lazy loading setting the…
John
  • 237
  • 2
  • 6
5
votes
1 answer

Windsor Castle/ DI and object models

I use Windsor Castle quite a while now. It is just perfect for environments where data is located in a database or the like, where the repository pattern or the unitofwork pattern do work well. Now I do have a different situation: I have a complex…
5
votes
2 answers

Unity Factory Injection

I have an interface like the below one which I inject into unity container. public interface IMyInstanceFactory { IEnumerable GetAll(); } All IMyInstance are known before runtime i.e they can be setup within the bootstrapper and…
Mike
  • 3,204
  • 8
  • 47
  • 74
5
votes
2 answers

Lazy loading with NHibernate Castle Facility

Do I have to close the ISession's that are generated by Castle's ISessionManager for NHibernate? How do I handle transactions with those ISession's? I'm still quite new to NHibernate. Edit: I would like to have lazy loading but I get this…
Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
5
votes
2 answers

What is best practise when instantiating a Castle Windsor container in a class library?

I am wondering where the best place to instantiate the castle Windsor container is in a class library. Should I simply do it in the constructor of the class I am using or is there a single entry point for assemblies that I am unaware of? Thanks.
shenku
  • 11,969
  • 12
  • 64
  • 118
4
votes
2 answers

Is there an equivalent to Monorail view components for the ASP.Net MVC Framework?

I make heavy use of View Components in some of the larger applications I've built in Monorail - What is the equivalent approach in ASP.Net MVC for a view component, that can support sections etc.?
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
1
2
3
25 26