>From this page:
>
>
http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.messageencodingbindingelement(v=vs.110).aspx>
>...I converted the BuildChannelListener() method.
>
>This gives this:
>
>
> Public Overrides Function BuildChannelListener(Of TChannel)(context As System.ServiceModel.Channels.BindingContext) _
> As System.ServiceModel.Channels.IChannelListener(Of TChannel)
> If context Is Nothing Then
> Throw New ArgumentNullException("context")
> End If
>
> context.BindingParameters.Add(Me)
> Return context.BuildInnerChannelListener(Of TChannel)()
> End Function
>
>
>This gives:
>
>"Public Overrides Function BuildChannelListener(Of TChannel)(context As System.ServiceModel.Channels.BindingContext) As System.ServiceModel.Channels.IChannelListener(Of TChannel)' cannot override 'Public Overridable Function BuildChannelListener(Of TChannel As {System.ServiceModel.Channels.IChannel, Class})(context As System.ServiceModel.Channels.BindingContext) As System.ServiceModel.Channels.IChannelListener(Of TChannel)' because they differ by type parameter constraints."
>
>"Type argument 'TChannel' does not inherit from or implement the constraint type 'System.ServiceModel.Channels.IChannel'."
>
>"Type argument 'TChannel' does not satisfy the 'Class' constraint for type parameter 'TChannel'."
>
>All the other methods work ok on the conversion. This one at the designer level it does not work that much.
>
>Anyone would know what I am missing?
Maybe;
Public Overrides Function BuildChannelListener(Of TChannel As {Class, IChannel})(context As BindingContext) _
As IChannelListener(Of TChannel)
If context Is Nothing Then
Throw New ArgumentNullException("context")
End If
context.BindingParameters.Add(Me)
Return context.BuildInnerChannelListener(Of TChannel)()
End Function