Re: Class proxy for existing class instance

2009-08-11 Thread Krzysztof Koźmic
Only when you use interface. You'd have to edit type and you can't change type of existing object. paszczi wrote: Hi! I'm trying to make a readonly version of several classes inside my projects that are meant to hold data. The flow is: (1) DataClass instance with filled properties -

Re: WcfFacility - ChannelFactory.Close() not being called?

2009-08-11 Thread John Simons
Added the issue to Donjon - http://support.castleproject.org/projects/FACILITIES/issues/view/FACILITIES-ISSUE-124 On Aug 10, 2:52 pm, John Simons johnsimons...@yahoo.com.au wrote: Not sure if I'm using this facility correctly. I'm using it on the client side. I have configured my services

Re: [ActiveRecord] Cannot map varbinary(2147483647)

2009-08-11 Thread Daniel Hölbling
Hi Michael,thanks for the suggestion. But I tried that since it popped up in some searches from people using NHibernate. I solved the problem with IMAGE as it is supported by SqlLite and SqlServer and is also 2^31-1 of length. Thanks anyway! greetings Daniel On Tue, Jul 28, 2009 at 1:15 AM,

Re: [MonoRail] DefaultValue attribute

2009-08-11 Thread Daniel Hölbling
Hmm.. That's a good Question. Actually it will result in a MonoRailException. Only improvement could be to make it throw a FormatException so that MonoRail outputs a nicer errormessage. But I believe failing fast is best here. Now what made me wonder a bit is how to test this thing. I'm trying to

Re: [MonoRail] DefaultValue attribute

2009-08-11 Thread James Curran
The ViewComponentParamAttribute has a DefaultValue option, which is handled in ViewComponent.BindParameter() for comparison. On Tue, Aug 11, 2009 at 6:42 AM, Daniel Hölblinghoelblin...@gmail.com wrote: Hmm.. That's a good Question. Actually it will result in a MonoRailException. Only

Re: WcfFacility - ChannelFactory.Close() not being called?

2009-08-11 Thread Craig Neuwirt
John, The ChannelFactory create multiple channels and thus will not be closed when you release the proxy. The actual Channel will be closed however. Then the component is released or the container is disposed of, the ChannelFactory will get closed. craig On Sun, Aug 9, 2009 at 11:52 PM, John

Re: WCFFacility

2009-08-11 Thread Gabriel Mancini de Campos
Yes well the name Autenticacao.login in id component must to be reference with Service name=Autenticacao and endpoit name=login and in your WCF App must to be a folder Autenticacao and a file login.svc and inside this file %@ ServiceHost Language=C# Debug=true Service=Autenticacao.login

NewtonSoft 3.5

2009-08-11 Thread Wayne Douglas
Hi Are there any plans to move the trunk up to the latest version of newtonsoft json? I have tried but my local build went tits up... :s -- Cheers, w:// --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Castle

Re: How to pass open ADO.NET connection to ActiveRecordMediator - SessionFactory.OpenSession

2009-08-11 Thread EricP
Another approach I tried was getting connection directly from ActiveRecord using code: === using (var sessionScope = new SessionScope()) { IDbConnection cn = ActiveRecordMediator.GetSessionFactoryHolder()

Re: How to pass open ADO.NET connection to ActiveRecordMediator - SessionFactory.OpenSession

2009-08-11 Thread Markus Zywitza
No, not if the connection was provided by NH. In the code example of your initial post, you managed the connection explicitly. Why is it a problem then to pass an open session to DifferentDatabaseScope? -Markus 2009/8/11 EricP ericpopiv...@gmail.com Another approach I tried was getting

AR, ASP.NET, SessionScope - Trouble with dirty objects and validators

2009-08-11 Thread Thi
I've got an ASP.NET website setup using Castle ActiveRecord and Validator, the website is using a custom Http Module to create/dispose the SessionScope per request. Scenario: A request comes in to Modify a customer object. Customer cm = Customer.Find(customerId); cm.Mobile =

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Ayende Rahien
Okay,We have two distinct requests here. One is for WCF stuff, and as presented, it looks like life styles can resolve that. Second is for additional providers for handlers, for things like MEF, lazy component discovery, etc. Is this accruate? 2009/8/11 Krzysztof Koźmic krzysztof.koz...@gmail.com

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Craig Neuwirt
Hey guys, Just returned from a quick vacation. I don't think WCF presents any different scenario than MEF or any lazy discovery. WCF Facility would take advantage of the same deferred resolution hook to provide WCF managed proxies that were only defined in the standard system.serviceModel

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Ayende Rahien
In that case, I don't understand it, do read the app.config to integrate with that? 2009/8/11 Craig Neuwirt cneuw...@gmail.com Hey guys, Just returned from a quick vacation. I don't think WCF presents any different scenario than MEF or any lazy discovery. WCF Facility would take

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Craig Neuwirt
The original feature request for the WCF Facility was to not require registering a client component for a WCF interface that is already defined in the app.config/web.config via the system.serviceModel section. This makes it nice and DRY to not have to indicate that you want a WCF Facility managed

Re: ActiveRecord mapping against an Interface

2009-08-11 Thread JakeS
I think the [HasManyToAny] was exactly what I was looking for. Thank you for the replies. On Aug 11, 12:24 am, Markus Zywitza markus.zywi...@gmail.com wrote: Hi Jake, 2009/8/10 JakeS jakesteven...@gmail.com [ActiveRecord] public class WhiteBoard : ModelBaseWhiteBoard, IRecentUpdated

Re: AR, ASP.NET, SessionScope - Trouble with dirty objects and validators

2009-08-11 Thread Markus Zywitza
ActiveRecordMediatorCustomer.Evict(cn); 2009/8/11 Thi thi.saa...@gmail.com I've got an ASP.NET website setup using Castle ActiveRecord and Validator, the website is using a custom Http Module to create/dispose the SessionScope per request. Scenario: A request comes in to Modify a customer

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Ayende Rahien
Okay, now that I understand it, it is the same, yes.I'll start a new thread with thoughts about the whole topic 2009/8/11 Craig Neuwirt cneuw...@gmail.com The original feature request for the WCF Facility was to not require registering a client component for a WCF interface that is already

Re: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Ayende Rahien
forgot to mention, the new thread is going to be in the dev group, which is more appropriate 2009/8/11 Ayende Rahien aye...@ayende.com Okay, now that I understand it, it is the same, yes.I'll start a new thread with thoughts about the whole topic 2009/8/11 Craig Neuwirt cneuw...@gmail.com

Re: AR, ASP.NET, SessionScope - Trouble with dirty objects and validators

2009-08-11 Thread Thi
I'm sorry I forgot to mention I'm using AR RC3 (the app has to be running on top of .NET 2.0) On Aug 11, 12:54 pm, Markus Zywitza markus.zywi...@gmail.com wrote: ActiveRecordMediatorCustomer.Evict(cn); 2009/8/11 Thi thi.saa...@gmail.com I've got an ASP.NET website setup using Castle

Databinding to a property as an Enum

2009-08-11 Thread JakeS
I'm trying to databind to a property that's defined as an Enum like so: [Flags] public enum SystemChecks { Fire = 1, CarbonMonoxide = 2, Flood = 4, Medical = 8 } [ActiveRecord] public class JobInformation : ModelBaseJobInformation { [Property] public SystemChecks SystemIncludes {

Re: Databinding to a property as an Enum

2009-08-11 Thread JakeS
Sorry, alt +tab doesn't increase indent here, it goes to SEND Here's what I was trying to say: I'm trying to databind to a property that's defined as an Enum. I looked at

Re: DP2, Silverlight, Change Notification

2009-08-11 Thread Christopher Bennage
Ok, I finally getting back to this. The classes I'm passing over the wire look something like this: [DataContract] public class SomeDto { [DataMember] public Guid Id { get; set; } [DataMember] public virtual DateTime? LastUpdatedAt { get; set; }

Re: DP2, Silverlight, Change Notification

2009-08-11 Thread Christopher Bennage
Ok, I just read Ayende's post here: http://ayende.com/Blog/archive/2009/08/07/nhibernate-amp-inotifypropertychanged.aspx It is really similar to what I am thinking about. I just want to do this when WCF provides me the instance, rather than NHibernate. I think maybe it's my WCF ignorance that's

Re: DP2, Silverlight, Change Notification

2009-08-11 Thread Christopher Bennage
Ok, I think that I've discovered the solution I was looking for. I need to implement IClientMessageFormatter on the Silverlight client, and plugin the proxy generation there. Once I get this working, I'll post about it on my blog. On Aug 11, 3:41 pm, Christopher Bennage

Re: Databinding to a property as an Enum

2009-08-11 Thread James Curran
This is just off the top of my head untested, but here goes PropertyBag[CurSysCheckNameList]=Enum.GetName(typeof(SystemChecks), CurrentJobInformation.SystemIncludes).Split(new char[] {',', ' '}, StringSplitOptions.RemoveEmptyEntries); #foreach($SysCheck in $CurSystemChecks) input

Re: DP2, Silverlight, Change Notification

2009-08-11 Thread Krzysztof Koźmic
You can use something like this: http://gist.github.com/166110 to set up the interception. Interface proxy with target is a class that implements an interface, and calls to that interface members are forwarded to the target class, which obviously also have to implement that interface.

RE: Design questions for resolution of IOC-ISSUE-161

2009-08-11 Thread Adam Langley
Thanks Craig, you've got it bang on in one, and cheers Ayende, a custom Lifecycle would be just what Im looking for to work in unison with the lazy loading mechanism. Adam Langley Senior Developer www.winscribe.com Please consider the environment before printing this email! From:

Re: DP2, Silverlight, Change Notification

2009-08-11 Thread Ayende Rahien
I will put up a post about this shortly. 2009/8/11 Christopher Bennage christop...@bluespireconsulting.com Ok, I just read Ayende's post here: http://ayende.com/Blog/archive/2009/08/07/nhibernate-amp-inotifypropertychanged.aspx It is really similar to what I am thinking about. I just want

Re: WcfFacility - ChannelFactory.Close() not being called?

2009-08-11 Thread John Simons
Craig, So, you are saying that the ChannelFactory is reused but the Channel is not. Also, you are saying that if I call container.Release(proxy); the channel will be disposed. I don't see this happening, I'm using the trunk version and have put break points on your code pretty much everywhere I

Re: WcfFacility - ChannelFactory.Close() not being called?

2009-08-11 Thread Craig Neuwirt
On Tue, Aug 11, 2009 at 8:04 PM, John Simons johnsimons...@yahoo.com.auwrote: Craig, So, you are saying that the ChannelFactory is reused but the Channel is not. Basically yes. If a channel is faulted it is automatically refreshed. Also, you are saying that if I call

Re: AR insert overflow

2009-08-11 Thread olcay şeker
thanks for your answer. it works when i am using ActiveRecordMediator.Save(item) instead of inheriting ActiveRecordBase. but i only call insert method once. but first i get instence of this class from windsor container. after i call this method it overflows but nothing entered to db. am i doing

Re: AR insert overflow

2009-08-11 Thread Christian Würdig
From your screenshot your code looks like this: public void Insert(T item) { try { Insert(item);// the function calls itself again - infinite recursion } catch { } } Unless I'm missing something. olcay şeker wrote: thanks for your answer. it works when i