[rabbitmq-discuss] RabbitMQ.Net, Windows Powershell and CLS compliance
Jon Palmer
jonspalmer at gmail.com
Sun Mar 1 19:39:29 GMT 2009
I am going to try modifying the source to remove the public field as the
next step. However I have two concerns:
1. I'm slightly afraid that there might be other examples of this problem
lurking.
2. Fixing the problem is a 'breaking change' in that it requires removing a
public field. Its unlikely to be a big deal because the fix to use the
property that is left is easy. However it might break some code that relies
on the removed field.
Jon
On Sun, Mar 1, 2009 at 11:33 AM, Alexis Richardson <
alexis.richardson at cohesiveft.com> wrote:
> Jon,
>
> Thanks very much for raising this here. Someone will look at your
> 'getter and the field' question asap.
>
> Meanwhile (as it is Sunday..), can I ask if you have tried patching
> the code per your suggested fix? If so, can you let us know what
> happens.
>
> alexis
>
>
> On Sun, Mar 1, 2009 at 6:36 PM, Jon Palmer <jonspalmer at gmail.com> wrote:
> > I am new to using RabbitMQ and I couldn't find if this question has been
> > asked on the mailing list before.
> > I'm trying to use RabbitMQ.Net inside a Powershell script. Something like
> > this:
> >
> > [System.Reflection.Assembly]::LoadFile( "C:\tools\RabbitMQ.Client.dll")
> > function GetAmqpChannel( $amqp_host ="127.0.0.1", $uid ="guest", $pwd
> > ="guest")
> > {
> > $factory = new-object RabbitMQ.Client.ConnectionFactory
> > $protocol = [RabbitMQ.Client.Protocols]::DefaultProtocol
> > return $factory.CreateConnection($protocol, $amqp_host).CreateModel()
> > }
> > GetAmqpChannel
> >
> >
> >
> > However I receive the following error:
> >
> > The field/property: "shutdownReport" for type:
> > "RabbitMQ.Client.Framing.Impl.v0_8.Connection" differs only in case from
> > the field/property: "ShutdownReport". Failed to use non CLS compliant
> type.
> >
> > Looking at the source it seems that the problem is
> that RabbitMQ.Client.Impl
> > declares both
> >
> > public System.Collections.IList ShutdownReport { get; }
> >
> > public System.Collections.IList shutdownReport
> >
> > As a result the Client.Impl class isn't CLS compliant. This prevents me
> from
> > using RabbitMQ.Net inside powershell. Does anyone have suggestions about
> how
> > this can be fixed? Are both the getter and the field a required part of
> the
> > public API or could one be removed?
> >
> > Many thanks
> >
> > Jon
> >
> >
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090301/eb494bbf/attachment.htm
More information about the rabbitmq-discuss
mailing list