I would try a more segregated approach. Maybe a method to return some config model, or a separated class. My concern is that the key pair string can easily clog the marked method readability.
Cheers, Henry Conceição On Fri, Aug 12, 2011 at 6:29 AM, Jordan <[email protected]> wrote: > Yeah that would work. > At first I was slightly wary of having to pass a string in, but I > guess it could be defined as a public constant so you would do > something like: > [Transaction(CustomContext = "SomeClass.ReadOnly ")] > > regards, > Jordan > > > On Aug 11, 7:47 pm, "Henrik Feldt" <[email protected]> wrote: > > Well, perhaps it would be simpler to register them in the container and > > resolve them e.g. the first transaction? > > > > Which transaction is read only could be specified e.g.: > > [Transaction(CustomContext = "ReadOnly;OtherThing;ThirdThing ")]? > > > > > > > > > > > > > > > > -----Original Message----- > > From: [email protected] > > > > [mailto:[email protected]] On Behalf Of Jordan > > Sent: den 11 augusti 2011 16:09 > > To: Castle Project Development List > > Subject: Re: TransactionAttribute.CustomContext > > > > No problem, visitor pattern I do know :) That could be cool - how would > you > > specify the visitor? Through another attribute? > > > > regards, > > Jordan. > > > > On Aug 10, 9:55 pm, "Henrik Feldt" <[email protected]> wrote: > > > Ah, sorry, it's just me speaking strangely. I mean that I could add > > > something like the visitor pattern (inspectors) where the inspectors > > > can be allowed to have their say about the type of transaction to > > > create, from the CreateTransaction > > method: > https://github.com/haf/Castle.Transactions/blob/master/src/Castle.Ser > > ... > > > ransaction/TransactionManager.cs > > > > > Regards, > > > Henrik > > > > > -----Original Message----- > > > From: [email protected] > > > > > [mailto:[email protected]] On Behalf Of Jordan > > > Sent: den 10 augusti 2011 12:51 > > > To: Castle Project Development List > > > Subject: Re: TransactionAttribute.CustomContext > > > > > Hi Henrik, > > > > > Sorry I've got no idea what a 'custom inspector' is, and a quick > > > google hasn't helped. Can you point me in the right direction? > > > > > regards, > > > Jordan. > > > > > On Aug 4, 11:39 pm, "Henrik Feldt" <[email protected]> wrote: > > > > How would you like to solve the problem if you get to choose? > > > > > > A ';'-separated string, for example? Or would you add some 'custom > > > > inspector' to a pipeline when checking whether a method should be > > wrapped? > > > > > > Regards, > > > > Henrik > > > > > > -----Original Message----- > > > > From: [email protected] > > > > > > [mailto:[email protected]] On Behalf Of Jordan > > > > Sent: den 1 augusti 2011 13:30 > > > > To: Castle Project Development List > > > > Subject: TransactionAttribute.CustomContext > > > > > > Hello all, > > > > > > I've just had my first look at the new Castle.Transactions code. In > > > > the discussion about read only transactions it was suggested that we > > > > could use the "CustomContext" property to pass in the read only flag. > > > > However, as far as I understand it IEnumerable<KeyValuePair<string, > > > > object>> is not a valid attribute parameter type. > > > > > > Or is there some new funky syntax that I'm not aware of? > > > > > > cheers, > > > > Jordan. > > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Castle Project Development List" group. > > > > To post to this group, send email to > > > [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]. > > > > For more options, visit this group > > > athttp://groups.google.com/group/castle-project-devel?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Castle Project Development List" group. > > > To post to this group, send email to > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group > > athttp://groups.google.com/group/castle-project-devel?hl=en. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Castle Project Development List" group. > > To post to this group, send email to > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group athttp:// > groups.google.com/group/castle-project-devel?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Development List" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-devel?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.
