[Mono-dev] (WCF) Possible bug in ChannelFactoryBase.cs
Atsushi Eno
atsushieno at veritas-vos-liberabit.com
Tue Jul 6 00:22:37 EDT 2010
Hi,
You're right. I've tried this simple testing on .NET, and it threw
ArgumentNullException on
via parameter, so it is expected as non-null.
[Test]
public void BuildChannelFactoryXXX ()
{
var ctx = new BindingContext (new CustomBinding (), empty_params);
var cf = new HttpTransportBindingElement
().BuildChannelFactory<IRequestChannel> (ctx);
Assert.IsTrue (cf is ChannelFactoryBase<IRequestChannel>, "#1");
cf.Open ();
cf.CreateChannel (new EndpointAddress ("http://localhost:8080"), null);
}
A fix should go into svn soon. Thanks.
Atsushi Eno
On 2010/07/06 10:26, Thiago Padilha wrote:
> Hi,
>
> I'm not sure about this, but maybe there's a small bug in the
> 'CreateChannel(EndpointAddress)' method :
>
> "
> public TChannel CreateChannel (
> EndpointAddress remoteAddress)
> {
> return CreateChannel (remoteAddress, null);
> }
> "
>
> The MSDN sample
> http://msdn.microsoft.com/en-us/library/ms751494.aspx makes use of the
> "via" parameter(which I don't understand what it's purpose is) on the
> "OnCreateChannel" implementation in "UdpOutputChannel" class. Maybe
> the passing "remoteAddress.Uri" instead of null would make it work as
> expected? Here is how it would look :
>
> "
> public TChannel CreateChannel (
> EndpointAddress remoteAddress)
> {
> return CreateChannel (remoteAddress, remoteAddress.Uri);
> }
> "
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
>
>
More information about the Mono-devel-list
mailing list