Questions tagged [spring.net]

Spring.NET is an open source application framework for developing .NET enterprise applications.

Spring.NET is an open source application framework for developing .NET enterprise applications, inspired by the popular Spring for Java. It provides infrastructural support to make best practices easy practices. Spring.NET consists of several modules, most notably:

For information on additional modules and other background information, see the overview page on the Spring.NET website. Technical documentation is also available on this site.

Related tags

632 questions
0
votes
0 answers

Spring .Net Setter injection

I need to inject either through setter or constructor level a interface with spring .Net. I don't want to write spring.Net (use of ApplicationContext) code but accomplish it purely through XML. It seems like its not possible and my thinking is to…
Francois Taljaard
  • 1,339
  • 2
  • 12
  • 33
0
votes
2 answers

How should I be configuring spring and hibernate so that my Integration Tests replicate properly the behaviour of the Web application?

We have a web application based on NSpring 1.2 and NHibernate 2 and use HibernateTemplate. The web application is configured to use OpenSessionInViewModule. In our integration tests however the hibernate session is marked as InitDeferredClose and…
Tom Carter
  • 2,938
  • 1
  • 27
  • 42
0
votes
1 answer

Injecting a generic IList from spring.net

I have an enumeration in the namespace Device.Control ... public enum State { IN_PROGRESS, SUSPENDED, HALTED, FINISHED } And I have a class... public class CustomStateManager { public IList ManagingStates { get; set; } } And here's…
kevin628
  • 3,458
  • 3
  • 30
  • 44
0
votes
1 answer

Is it possible in Spring.Net to replace a C# property (using the replaced-method declaration?

I am trying to figure out if it's possible to use the and an object implementing IMethodReplacer in spring.Net to swap out a getter in C#? In this case I have to go this route because the property being injected is a calculated…
0
votes
2 answers

How do I create a spring .Net standalone object of type Int32 defined in the IOC context file?

Kind of a simple newbie question...I see how I can create a string object, but how would I create an int object? Here is the xml code fragment from my context file:
0
votes
0 answers

i can't instanciate a class with no arguments using spring

I have a class with a constructor without arguments and I want to instantiate using spring, but I get the following error: Error creating context 'spring.root': Cannot instantiate a class that does not have a no-argument constructor Here the…
YouneL
  • 8,152
  • 2
  • 28
  • 50
0
votes
1 answer

Spring .NET setting a property value in config without instantiating the object

I am writing a TestClass let's say "ServiceTest" which has a property called ExampleService public IService ExampleService { get; set;} I am using the ExampleService inside my test method and invoking some operations on it. I need to instantiate…
0
votes
1 answer

How to set enum Type indexer in Spring.NET configuration xml?

I have this code: public enum StateId { NotSet = 0, AL, ..., WY } public class EnumBasedArray:IEnumerable { public V this[I index] { get { return _data[index]; } set { _data[index] = value; } } // other code to manage…
JohnKeller
  • 419
  • 3
  • 13
0
votes
1 answer

Removing Spring.Cache

I am trying to clear the cache for my integration testing. I could find "InvalidateCache" attribute in Spring documentation, but i do not want to touch the real function and change the attribute. I think I can't use .Net's HttpContext.Cache.Remove…
demokritos
  • 1,416
  • 2
  • 12
  • 34
0
votes
1 answer

Spring.Core.TypeMismatchException: Cannot convert property of type [...] to required type [...]

my problem is that I cannot do any test anymore after I made a tfs update on the project I'm working on. Before the update it worked but now I'm getting a Spring.Core.TypeMismatchException everytime I run the ContextRegistry.GetContext() method in…
Lyndon
  • 149
  • 1
  • 2
  • 14
0
votes
2 answers

Spring.net wcf integration

I have a WCF service and use Spring.ServiceModel.Activation.ServiceHostFactory as a factory in my *.svc. What I need is to load some data into cache when service is called first time or restarted. Could you please suggest a best way to do so? Right…
Alex
  • 11
  • 3
0
votes
1 answer

Spring.NET ObjectDefinitionStoreException using assembly to store configuration files

I am learning Spring.Net, I created a class MyApplication and a library class MyLib with all the spring configuration files that MyApplication needs. I retrieve the metadata using: IApplicationContext ctx = new…
eqtèöck
  • 971
  • 1
  • 13
  • 27
0
votes
2 answers

dependency injection in to mvc attributes

I am working with asp.net mvc4 and have a form where I accept data from a user. Input fields like name, address etc. I want to be able to validate such with the normal mvc validation attributes but as the site varies based upon the certain…
amateur
  • 43,371
  • 65
  • 192
  • 320
0
votes
1 answer

Instantiating a Spring.Net context inside a static method causes a memory leak

Ran across this recently and wondering if someone out there can give me a good explanation. I was doing some refactoring and created a spring context to grab a configured service from an embedded config file like so: var myService = …
MadMax1138
  • 287
  • 2
  • 8
0
votes
2 answers

Integrating Spring.NET with Specflow

Can I make use of Spring.NET's base classes (a la AbstractDependencyInjectionSpringContextTests) for loading an application context and performing dependency injection using MSTest? I'm trying to develop transactional scenarios that will ultimately…
pcw216
  • 126
  • 2