Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion in VB.NET does not work
Message
De
15/07/2014 11:45:02
 
 
À
15/07/2014 11:41:39
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:
01603706
Vues:
35
>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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform