Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion in VB.NET does not work
Message
De
15/07/2014 12:08:33
 
 
À
15/07/2014 11:45:02
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01603662
Message ID:
01603709
Vues:
33
>>Because of how the base generic types are defined:
Public Overridable Function CanBuildChannelFactory(Of TChannel) ( _
>>	context As BindingContext _
>>) As Boolean
Public Overridable Function BuildChannelListener(Of TChannel As {Class, IChannel}) ( _
>>	listenUriBaseAddress As Uri, _
>>	ParamArray parameters As Object() _
>>) As IChannelListener(Of TChannel)
>>http://msdn.microsoft.com/en-us/library/ms405436(v=vs.110).aspx
>>http://msdn.microsoft.com/en-us/library/ms405443(v=vs.110).aspx
>
>Thanks, that is very useful.
>
>With that reference, I was able to complete the last one, which also requires the addition of As Class in the Public line:
>
>
>    Public Overrides Function GetProperty(Of T As Class)(context As System.ServiceModel.Channels.BindingContext) As T
>        If GetType(T) = GetType(System.Xml.XmlDictionaryReaderQuotas) Then
>            Return DirectCast(DirectCast(m_readerQuotas, Object), T)
>        Else
>            Return MyBase.GetProperty(Of T)(context)
>        End If
>    End Function
>
>
>I just do not understand why the examples I got from the net did not have that. Or, maybe it is the C# to VB.NET converter which did not take care of that.

Did the original C# code have the 'where' clause on the method?
IAC I just tried with the Telerik converter and it looks as if it ignored the 'where' :-{
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform