spring.net

Spring.NET problem with <idref> tag in config

一世执手 提交于 2019-12-24 11:25:05
问题 According to the help file that comes with the Spring.NET framework, you can inject a dependancy defined in the local file by using an 'idref' tag along with a 'local' attribute. I have been trying to do this with no success and was hoping someone had the experience to help me out. Below I have a snippet from the config where I am passing it as a constructor argument, but I have tried setting it as a property as well. Both methods seem to yield the same error. <object id="theTargetObject"

Lazy property loading in Nhibernate and Spring

六眼飞鱼酱① 提交于 2019-12-24 10:49:01
问题 I'm using NHibernate 2.1.2 and Spring 1.3 I have two Text columns (blobs) in one of my classes. I'm trying to use lazy="true" for the mapping of those properties but NHProfiler still shows the two columns being added to the SELECT statement when the main object is loaded. I'm using Spring.NHibernate session factory and have configured ProxyFactory with both Castle and Spring with no luck. 回答1: So far I know that's something NOT included on the version 2.1.2 According this url, lazy properties

Configure static properties with spring.NET

随声附和 提交于 2019-12-24 05:59:14
问题 What are best practices to configure following class with spring.NET? using System.Collections.Generic; using Edu3.DTOModel; namespace Edu3.Data.SubsonicProvider.RepositoryFramework { public static class RepositoryFactory { private static readonly Dictionary<string, object> Repositories = new Dictionary<string, object>(); static RepositoryFactory() { Repositories.Add(typeof(ISsoUrlTemplateRepository).Name, new SsoUrlTemplateRepository()); Repositories.Add(typeof(IPackageSessionNodeRepository)

Configure static properties with spring.NET

我的未来我决定 提交于 2019-12-24 05:59:08
问题 What are best practices to configure following class with spring.NET? using System.Collections.Generic; using Edu3.DTOModel; namespace Edu3.Data.SubsonicProvider.RepositoryFramework { public static class RepositoryFactory { private static readonly Dictionary<string, object> Repositories = new Dictionary<string, object>(); static RepositoryFactory() { Repositories.Add(typeof(ISsoUrlTemplateRepository).Name, new SsoUrlTemplateRepository()); Repositories.Add(typeof(IPackageSessionNodeRepository)

SignalR dependency injection via Spring.Net

淺唱寂寞╮ 提交于 2019-12-24 03:32:27
问题 I'm trying to inject dependencies via Spring.NET. First I created a custom DependencyResolver: public class SignalRSpringNetDependencyResolver : DefaultDependencyResolver { private IApplicationContext _context; public SignalRSpringNetDependencyResolver(IApplicationContext context) { _context = context; } /// <summary> /// Gets the application context. /// </summary> /// <value>The application context.</value> public IApplicationContext ApplicationContext { get { if (_context == null ||

Replace Spring.Net IoC with another Container (e.g. Ninject)

蹲街弑〆低调 提交于 2019-12-23 10:10:23
问题 I'm curious to know if it's possible to replace Spring.Net's built-in IoC container with Ninject. We use Ninject on my team for IoC in our other projects so I would like to continue using that container if possible. Is this possible? Has anyone written a Ninject-Spring.Net Adapter?? Edit I like many parts of the Spring.Net package (the data access, transactions, etc.) but I don't really like the dependency injection container. I would like to replace that with Ninject Thanks 回答1: Jeffrey, can

Add entry to dictionary in child object

允我心安 提交于 2019-12-23 01:47:34
问题 How is it possible to add entry to dictionary, defined in parent object, from the child object? * UPDATED I edit my config as follows: <object id="ParentType" singleton="false" type="SomeType"> <property name="FieldNameMap"> <dictionary key-type="string" value-type="string" > <entry key="Title" value="TitleName"/> </dictionary> </property> </object> <object id="ChildType" singleton="false" type="SomeType" parent="ParentType"> <property name="FieldNameMap"> <dictionary merge="true"> <!-- this

Can Spring.Net function as PostSharp?

徘徊边缘 提交于 2019-12-22 08:35:23
问题 A few months back I've discovered PostSharp, and for a time, it was good. But then legal came back with an answer saying that they don't like the licence of the old versions. Then the department told me that 2.0's price was unacceptably high (for the number of seats we need)... I was extremely disapponted, but not disheartened. Can't be the only such framework, I thought. I kept looking for a replacement, but most of it was either dead, ill maintained (especially in documentation department),

Property Inject an Array with Spring.Net

不羁的心 提交于 2019-12-22 08:23:40
问题 I've been using the Spring.Net IoC container and can use it to inject properties that are of type IList and even IList<T> but I'm a bit stumped as to how to inject a property thats of type string[] . There doesn't seem to be an <array> element defined in the XSD's and using <list> <value> </list> doesn't work either. If anyone could post the xml I need to inject using an array for a property it'd be much appreciated 回答1: As mentioned here in the documentation you can inject a string array as

is spring.net being actively maintained/developed/documented?

断了今生、忘了曾经 提交于 2019-12-22 08:16:28
问题 In the course of evaluating .net IoC frameworks, I gave spring.net a try first, seeing as how much I liked spring in java. However, I'm rapidly getting the feeling that it is a stale/stalled/dead project. The forums have almost no activity; the documentation, though verbose, is infuriating with its self-referencing, poor examples, and incomplete sections; spring.net questions don't seem to get much traction on stackoverflow; and googling for spring.net issues usually leads to pages