spring.net

Connecting To A Private Remote MSMQ Queue

你。 提交于 2019-12-12 08:07:06
问题 I'm trying to connect to a remote private MSMQ queue using the path: "FormatName:DIRECT=OS:remoteMachineName\Private$\MyQueue" and I'm getting the following error: "The specified format name does not support the requested operation. For example, a direct queue format name cannot be deleted." I'm obviously doing something wrong. However this does work using a local queue. I'm using Spring.Net's Messaging. Here's my config <objects xmlns="http://www.springframework.net"> <object id="myQueue"

a good tutorial for .Net development with MVC, spring.net and NHibernate [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-11 23:04:41
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm coming from a php world and am now initaiting a project in .NET environment. After looking around, I noticed that the combination of MVC, spring.net and NHibernate might work for me. In PHP I created applications using Symfony (with propel or doctrine) that combined all these in one framework. The Jobeet

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

允我心安 提交于 2019-12-11 19:26:15
问题 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: <object id="myString" type="System.String"> <constructor-arg value="foo" /> </object> <object id="myInt" type="System.Int32"> <<<**** how do I set this ****>>>> </object> 回答1: Try this: <object id="MyInt" type="System.Int32" factory-method="Copy"> <constructor-arg index="0"> <value>123</value> </constructor-arg> </object> 回答2: Try

Can't serialize nested nHibernate entity for WCF web service

隐身守侯 提交于 2019-12-11 11:04:37
问题 I'm trying to use nHibernate, Spring and WCF together. I've got an Order object, and that contains a Customer object. I can call a WCF method findOrder on my service, and providing the Order 's Customer field does not have a DataMember annotation, the Web Service returns the Order I wanted. It does not contain the Customer details though, as expected. But when I try to include the Customer as well, the WebService fails, and looking in the WCF trace logs, I can see this error: System.Runtime

Can Spring.Net log what it's doing as it constructors objects?

旧时模样 提交于 2019-12-11 10:29:34
问题 Is there anyway to get Spring.Net to log what it's doing as it constructs objects? Something on the order of Constructing Object A Constructing Object B etc etc..... I need to resolve a circular dependency within my application, and seeing the order in which Spring is creating the objects could be a huge help. 回答1: This can easily be done. Spring uses Common.Logging. You can grab logging output from Spring.Objects.Factory.* classes and look for ... Creating instance of Object 'your-id-here' .

Generic Dictionary containing Generic List values in Spring.Net

天大地大妈咪最大 提交于 2019-12-11 10:13:47
问题 I have an object that contains a property: public Dictionary<string, List<Hotel>> CityHotels { get; set; } How do I use Spring.Net to configure this property? I tried doing this: <property name="CityHotels"> <dictionary key-type="string" value-type="System.Collections.Generic.List<MyNameSpace.Hotel, MyAssembly>" > <entry key="SYD"> <list element-type="MyNameSpace.Hotel, MyAssembly"> </list> </entry> </dictionary> </property> but it was unsuccessful: Error creating context 'spring.root': Could

IoC spring.net injecting System.Type

断了今生、忘了曾经 提交于 2019-12-11 07:36:47
问题 I am trying to initiate a class that is expecting a System.Type in it's CTOR. Is there a way in spring.net config file to accomplish this, and preferable pass the type of a spring initialised object? Thanks, Lihnid 回答1: I think that this should do it: <constructor-arg name="argumentname" expression="T(namespace.to.my.type, assemblyname)" /> 回答2: This also works: <constructor-arg name="argumentname" value="MyNamespace.MyType, MyAssembly"/> Use VS2010 Add-In for intellisense: http://www

DryIoc, Spring.Net's GetObjectsOfType equivalent?

筅森魡賤 提交于 2019-12-11 07:36:18
问题 With Spring.Net, it's possible to query all objects of a certain (ancestor) type. var ctx = ContextRegistry.GetContext(); var setUsers = ctx.GetObjectsOfType(typeof(ISetUser)).Values.OfType<ISetUser>().ToList(); How can this be done with DryIoc? 回答1: The direct answer given sample classes and interfaces would be: public interface IA { } public interface IB { } public class AB : IA, IB { } public class AA : IA { } [Test] public void Resolve_all_services_implementing_the_interface() { var

Spring AOP + MVVM Foundation + PropertyChanged

隐身守侯 提交于 2019-12-11 07:30:12
问题 I'm using Spring.Net 1.3.1 alongside MVVM Foundation to apply cross-cutting to my viewmodels. I've noticed that if I assign a property changed handler before the object is converted to a proxy for cross-cutting that the proxy engine does not apply the property changed handler to the proxy. Does anyone know if this is expected behavior and if so, if there is a workaround? My factory looks like this public static class AopProxyFactory { public static object GetProxy(object target) { var factory

WCF WebService with Spring.NET could not find base address scheme http

风格不统一 提交于 2019-12-11 07:13:35
问题 I search the entire internet to solve this problem and although I found very similar problems, none of them were my own. Here's the deal: I want to configure a WCF Web Service (.Net 4.0 and VS 2010) with Spring.NET 1.3.1. for Dependence Injection. I'm using IIS 7 now (but I probably need to set it up for a different IIS later). I'm NOT configuring this to run with HTTPS (I'll probably want in the future, but that's not the case right now). I first configured the WCF Web Service without Spring