'------------------------------------------------------------------------------
' <auto-generated>
'     Este código fue generado por una herramienta.
'     Versión de runtime:4.0.30319.544
'
'     Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
'     se vuelve a generar el código.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On


'
'This code was auto-generated by Microsoft.Silverlight.ServiceReference, version 5.0.61118.0
'
Namespace RefAuthenticationSvc
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),  _
     System.ServiceModel.ServiceContractAttribute([Namespace]:="http://asp.net/ApplicationServices/v200", ConfigurationName:="RefAuthenticationSvc.AuthenticationService")>  _
    Public Interface AuthenticationService
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="http://asp.net/ApplicationServices/v200/AuthenticationService/ValidateUser", ReplyAction:="http://asp.net/ApplicationServices/v200/AuthenticationService/ValidateUserRespons"& _ 
            "e")>  _
        Function BeginValidateUser(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndValidateUser(ByVal result As System.IAsyncResult) As Boolean
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="http://asp.net/ApplicationServices/v200/AuthenticationService/Login", ReplyAction:="http://asp.net/ApplicationServices/v200/AuthenticationService/LoginResponse")>  _
        Function BeginLogin(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal isPersistent As Boolean, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndLogin(ByVal result As System.IAsyncResult) As Boolean
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="http://asp.net/ApplicationServices/v200/AuthenticationService/IsLoggedIn", ReplyAction:="http://asp.net/ApplicationServices/v200/AuthenticationService/IsLoggedInResponse")>  _
        Function BeginIsLoggedIn(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndIsLoggedIn(ByVal result As System.IAsyncResult) As Boolean
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="http://asp.net/ApplicationServices/v200/AuthenticationService/Logout", ReplyAction:="http://asp.net/ApplicationServices/v200/AuthenticationService/LogoutResponse")>  _
        Function BeginLogout(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Sub EndLogout(ByVal result As System.IAsyncResult)
    End Interface
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Public Interface AuthenticationServiceChannel
        Inherits RefAuthenticationSvc.AuthenticationService, System.ServiceModel.IClientChannel
    End Interface
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class ValidateUserCompletedEventArgs
        Inherits System.ComponentModel.AsyncCompletedEventArgs
        
        Private results() As Object
        
        Public Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
            MyBase.New(exception, cancelled, userState)
            Me.results = results
        End Sub
        
        Public ReadOnly Property Result() As Boolean
            Get
                MyBase.RaiseExceptionIfNecessary
                Return CType(Me.results(0),Boolean)
            End Get
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class LoginCompletedEventArgs
        Inherits System.ComponentModel.AsyncCompletedEventArgs
        
        Private results() As Object
        
        Public Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
            MyBase.New(exception, cancelled, userState)
            Me.results = results
        End Sub
        
        Public ReadOnly Property Result() As Boolean
            Get
                MyBase.RaiseExceptionIfNecessary
                Return CType(Me.results(0),Boolean)
            End Get
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class IsLoggedInCompletedEventArgs
        Inherits System.ComponentModel.AsyncCompletedEventArgs
        
        Private results() As Object
        
        Public Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
            MyBase.New(exception, cancelled, userState)
            Me.results = results
        End Sub
        
        Public ReadOnly Property Result() As Boolean
            Get
                MyBase.RaiseExceptionIfNecessary
                Return CType(Me.results(0),Boolean)
            End Get
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class AuthenticationServiceClient
        Inherits System.ServiceModel.ClientBase(Of RefAuthenticationSvc.AuthenticationService)
        Implements RefAuthenticationSvc.AuthenticationService
        
        Private onBeginValidateUserDelegate As BeginOperationDelegate
        
        Private onEndValidateUserDelegate As EndOperationDelegate
        
        Private onValidateUserCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginLoginDelegate As BeginOperationDelegate
        
        Private onEndLoginDelegate As EndOperationDelegate
        
        Private onLoginCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginIsLoggedInDelegate As BeginOperationDelegate
        
        Private onEndIsLoggedInDelegate As EndOperationDelegate
        
        Private onIsLoggedInCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginLogoutDelegate As BeginOperationDelegate
        
        Private onEndLogoutDelegate As EndOperationDelegate
        
        Private onLogoutCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginOpenDelegate As BeginOperationDelegate
        
        Private onEndOpenDelegate As EndOperationDelegate
        
        Private onOpenCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginCloseDelegate As BeginOperationDelegate
        
        Private onEndCloseDelegate As EndOperationDelegate
        
        Private onCloseCompletedDelegate As System.Threading.SendOrPostCallback
        
        Public Sub New()
            MyBase.New
        End Sub
        
        Public Sub New(ByVal endpointConfigurationName As String)
            MyBase.New(endpointConfigurationName)
        End Sub
        
        Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String)
            MyBase.New(endpointConfigurationName, remoteAddress)
        End Sub
        
        Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
            MyBase.New(endpointConfigurationName, remoteAddress)
        End Sub
        
        Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
            MyBase.New(binding, remoteAddress)
        End Sub
        
        Public Property CookieContainer() As System.Net.CookieContainer
            Get
                Dim httpCookieContainerManager As System.ServiceModel.Channels.IHttpCookieContainerManager = Me.InnerChannel.GetProperty(Of System.ServiceModel.Channels.IHttpCookieContainerManager)
                If (Not (httpCookieContainerManager) Is Nothing) Then
                    Return httpCookieContainerManager.CookieContainer
                Else
                    Return Nothing
                End If
            End Get
            Set
                Dim httpCookieContainerManager As System.ServiceModel.Channels.IHttpCookieContainerManager = Me.InnerChannel.GetProperty(Of System.ServiceModel.Channels.IHttpCookieContainerManager)
                If (Not (httpCookieContainerManager) Is Nothing) Then
                    httpCookieContainerManager.CookieContainer = value
                Else
                    Throw New System.InvalidOperationException("No se puede establecer el objeto CookieContainer. Asegúrese de que el enlace cont"& _ 
                            "iene un objeto HttpCookieContainerBindingElement.")
                End If
            End Set
        End Property
        
        Public Event ValidateUserCompleted As System.EventHandler(Of ValidateUserCompletedEventArgs)
        
        Public Event LoginCompleted As System.EventHandler(Of LoginCompletedEventArgs)
        
        Public Event IsLoggedInCompleted As System.EventHandler(Of IsLoggedInCompletedEventArgs)
        
        Public Event LogoutCompleted As System.EventHandler(Of System.ComponentModel.AsyncCompletedEventArgs)
        
        Public Event OpenCompleted As System.EventHandler(Of System.ComponentModel.AsyncCompletedEventArgs)
        
        Public Event CloseCompleted As System.EventHandler(Of System.ComponentModel.AsyncCompletedEventArgs)
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_BeginValidateUser(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginValidateUser
            Return MyBase.Channel.BeginValidateUser(username, password, customCredential, callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_EndValidateUser(ByVal result As System.IAsyncResult) As Boolean Implements RefAuthenticationSvc.AuthenticationService.EndValidateUser
            Return MyBase.Channel.EndValidateUser(result)
        End Function
        
        Private Function OnBeginValidateUser(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Dim username As String = CType(inValues(0),String)
            Dim password As String = CType(inValues(1),String)
            Dim customCredential As String = CType(inValues(2),String)
            Return CType(Me,RefAuthenticationSvc.AuthenticationService).BeginValidateUser(username, password, customCredential, callback, asyncState)
        End Function
        
        Private Function OnEndValidateUser(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As Boolean = CType(Me,RefAuthenticationSvc.AuthenticationService).EndValidateUser(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnValidateUserCompleted(ByVal state As Object)
            If (Not (Me.ValidateUserCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent ValidateUserCompleted(Me, New ValidateUserCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub ValidateUserAsync(ByVal username As String, ByVal password As String, ByVal customCredential As String)
            Me.ValidateUserAsync(username, password, customCredential, Nothing)
        End Sub
        
        Public Overloads Sub ValidateUserAsync(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal userState As Object)
            If (Me.onBeginValidateUserDelegate Is Nothing) Then
                Me.onBeginValidateUserDelegate = AddressOf Me.OnBeginValidateUser
            End If
            If (Me.onEndValidateUserDelegate Is Nothing) Then
                Me.onEndValidateUserDelegate = AddressOf Me.OnEndValidateUser
            End If
            If (Me.onValidateUserCompletedDelegate Is Nothing) Then
                Me.onValidateUserCompletedDelegate = AddressOf Me.OnValidateUserCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginValidateUserDelegate, New Object() {username, password, customCredential}, Me.onEndValidateUserDelegate, Me.onValidateUserCompletedDelegate, userState)
        End Sub
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_BeginLogin(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal isPersistent As Boolean, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginLogin
            Return MyBase.Channel.BeginLogin(username, password, customCredential, isPersistent, callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_EndLogin(ByVal result As System.IAsyncResult) As Boolean Implements RefAuthenticationSvc.AuthenticationService.EndLogin
            Return MyBase.Channel.EndLogin(result)
        End Function
        
        Private Function OnBeginLogin(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Dim username As String = CType(inValues(0),String)
            Dim password As String = CType(inValues(1),String)
            Dim customCredential As String = CType(inValues(2),String)
            Dim isPersistent As Boolean = CType(inValues(3),Boolean)
            Return CType(Me,RefAuthenticationSvc.AuthenticationService).BeginLogin(username, password, customCredential, isPersistent, callback, asyncState)
        End Function
        
        Private Function OnEndLogin(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As Boolean = CType(Me,RefAuthenticationSvc.AuthenticationService).EndLogin(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnLoginCompleted(ByVal state As Object)
            If (Not (Me.LoginCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent LoginCompleted(Me, New LoginCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub LoginAsync(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal isPersistent As Boolean)
            Me.LoginAsync(username, password, customCredential, isPersistent, Nothing)
        End Sub
        
        Public Overloads Sub LoginAsync(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal isPersistent As Boolean, ByVal userState As Object)
            If (Me.onBeginLoginDelegate Is Nothing) Then
                Me.onBeginLoginDelegate = AddressOf Me.OnBeginLogin
            End If
            If (Me.onEndLoginDelegate Is Nothing) Then
                Me.onEndLoginDelegate = AddressOf Me.OnEndLogin
            End If
            If (Me.onLoginCompletedDelegate Is Nothing) Then
                Me.onLoginCompletedDelegate = AddressOf Me.OnLoginCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginLoginDelegate, New Object() {username, password, customCredential, isPersistent}, Me.onEndLoginDelegate, Me.onLoginCompletedDelegate, userState)
        End Sub
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_BeginIsLoggedIn(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginIsLoggedIn
            Return MyBase.Channel.BeginIsLoggedIn(callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_EndIsLoggedIn(ByVal result As System.IAsyncResult) As Boolean Implements RefAuthenticationSvc.AuthenticationService.EndIsLoggedIn
            Return MyBase.Channel.EndIsLoggedIn(result)
        End Function
        
        Private Function OnBeginIsLoggedIn(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,RefAuthenticationSvc.AuthenticationService).BeginIsLoggedIn(callback, asyncState)
        End Function
        
        Private Function OnEndIsLoggedIn(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As Boolean = CType(Me,RefAuthenticationSvc.AuthenticationService).EndIsLoggedIn(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnIsLoggedInCompleted(ByVal state As Object)
            If (Not (Me.IsLoggedInCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent IsLoggedInCompleted(Me, New IsLoggedInCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub IsLoggedInAsync()
            Me.IsLoggedInAsync(Nothing)
        End Sub
        
        Public Overloads Sub IsLoggedInAsync(ByVal userState As Object)
            If (Me.onBeginIsLoggedInDelegate Is Nothing) Then
                Me.onBeginIsLoggedInDelegate = AddressOf Me.OnBeginIsLoggedIn
            End If
            If (Me.onEndIsLoggedInDelegate Is Nothing) Then
                Me.onEndIsLoggedInDelegate = AddressOf Me.OnEndIsLoggedIn
            End If
            If (Me.onIsLoggedInCompletedDelegate Is Nothing) Then
                Me.onIsLoggedInCompletedDelegate = AddressOf Me.OnIsLoggedInCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginIsLoggedInDelegate, Nothing, Me.onEndIsLoggedInDelegate, Me.onIsLoggedInCompletedDelegate, userState)
        End Sub
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefAuthenticationSvc_AuthenticationService_BeginLogout(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginLogout
            Return MyBase.Channel.BeginLogout(callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Sub RefAuthenticationSvc_AuthenticationService_EndLogout(ByVal result As System.IAsyncResult) Implements RefAuthenticationSvc.AuthenticationService.EndLogout
            MyBase.Channel.EndLogout(result)
        End Sub
        
        Private Function OnBeginLogout(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,RefAuthenticationSvc.AuthenticationService).BeginLogout(callback, asyncState)
        End Function
        
        Private Function OnEndLogout(ByVal result As System.IAsyncResult) As Object()
            CType(Me,RefAuthenticationSvc.AuthenticationService).EndLogout(result)
            Return Nothing
        End Function
        
        Private Sub OnLogoutCompleted(ByVal state As Object)
            If (Not (Me.LogoutCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent LogoutCompleted(Me, New System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub LogoutAsync()
            Me.LogoutAsync(Nothing)
        End Sub
        
        Public Overloads Sub LogoutAsync(ByVal userState As Object)
            If (Me.onBeginLogoutDelegate Is Nothing) Then
                Me.onBeginLogoutDelegate = AddressOf Me.OnBeginLogout
            End If
            If (Me.onEndLogoutDelegate Is Nothing) Then
                Me.onEndLogoutDelegate = AddressOf Me.OnEndLogout
            End If
            If (Me.onLogoutCompletedDelegate Is Nothing) Then
                Me.onLogoutCompletedDelegate = AddressOf Me.OnLogoutCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginLogoutDelegate, Nothing, Me.onEndLogoutDelegate, Me.onLogoutCompletedDelegate, userState)
        End Sub
        
        Private Function OnBeginOpen(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,System.ServiceModel.ICommunicationObject).BeginOpen(callback, asyncState)
        End Function
        
        Private Function OnEndOpen(ByVal result As System.IAsyncResult) As Object()
            CType(Me,System.ServiceModel.ICommunicationObject).EndOpen(result)
            Return Nothing
        End Function
        
        Private Sub OnOpenCompleted(ByVal state As Object)
            If (Not (Me.OpenCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent OpenCompleted(Me, New System.ComponentModel.AsyncCompletedEventArgs(e.[Error], e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub OpenAsync()
            Me.OpenAsync(Nothing)
        End Sub
        
        Public Overloads Sub OpenAsync(ByVal userState As Object)
            If (Me.onBeginOpenDelegate Is Nothing) Then
                Me.onBeginOpenDelegate = AddressOf Me.OnBeginOpen
            End If
            If (Me.onEndOpenDelegate Is Nothing) Then
                Me.onEndOpenDelegate = AddressOf Me.OnEndOpen
            End If
            If (Me.onOpenCompletedDelegate Is Nothing) Then
                Me.onOpenCompletedDelegate = AddressOf Me.OnOpenCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginOpenDelegate, Nothing, Me.onEndOpenDelegate, Me.onOpenCompletedDelegate, userState)
        End Sub
        
        Private Function OnBeginClose(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,System.ServiceModel.ICommunicationObject).BeginClose(callback, asyncState)
        End Function
        
        Private Function OnEndClose(ByVal result As System.IAsyncResult) As Object()
            CType(Me,System.ServiceModel.ICommunicationObject).EndClose(result)
            Return Nothing
        End Function
        
        Private Sub OnCloseCompleted(ByVal state As Object)
            If (Not (Me.CloseCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent CloseCompleted(Me, New System.ComponentModel.AsyncCompletedEventArgs(e.[Error], e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub CloseAsync()
            Me.CloseAsync(Nothing)
        End Sub
        
        Public Overloads Sub CloseAsync(ByVal userState As Object)
            If (Me.onBeginCloseDelegate Is Nothing) Then
                Me.onBeginCloseDelegate = AddressOf Me.OnBeginClose
            End If
            If (Me.onEndCloseDelegate Is Nothing) Then
                Me.onEndCloseDelegate = AddressOf Me.OnEndClose
            End If
            If (Me.onCloseCompletedDelegate Is Nothing) Then
                Me.onCloseCompletedDelegate = AddressOf Me.OnCloseCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginCloseDelegate, Nothing, Me.onEndCloseDelegate, Me.onCloseCompletedDelegate, userState)
        End Sub
        
        Protected Overrides Function CreateChannel() As RefAuthenticationSvc.AuthenticationService
            Return New AuthenticationServiceClientChannel(Me)
        End Function
        
        Private Class AuthenticationServiceClientChannel
            Inherits ChannelBase(Of RefAuthenticationSvc.AuthenticationService)
            Implements RefAuthenticationSvc.AuthenticationService
            
            Public Sub New(ByVal client As System.ServiceModel.ClientBase(Of RefAuthenticationSvc.AuthenticationService))
                MyBase.New(client)
            End Sub
            
            Public Function BeginValidateUser(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginValidateUser
                Dim _args((3) - 1) As Object
                _args(0) = username
                _args(1) = password
                _args(2) = customCredential
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("ValidateUser", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndValidateUser(ByVal result As System.IAsyncResult) As Boolean Implements RefAuthenticationSvc.AuthenticationService.EndValidateUser
                Dim _args((0) - 1) As Object
                Dim _result As Boolean = CType(MyBase.EndInvoke("ValidateUser", _args, result),Boolean)
                Return _result
            End Function
            
            Public Function BeginLogin(ByVal username As String, ByVal password As String, ByVal customCredential As String, ByVal isPersistent As Boolean, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginLogin
                Dim _args((4) - 1) As Object
                _args(0) = username
                _args(1) = password
                _args(2) = customCredential
                _args(3) = isPersistent
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("Login", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndLogin(ByVal result As System.IAsyncResult) As Boolean Implements RefAuthenticationSvc.AuthenticationService.EndLogin
                Dim _args((0) - 1) As Object
                Dim _result As Boolean = CType(MyBase.EndInvoke("Login", _args, result),Boolean)
                Return _result
            End Function
            
            Public Function BeginIsLoggedIn(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginIsLoggedIn
                Dim _args((0) - 1) As Object
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("IsLoggedIn", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndIsLoggedIn(ByVal result As System.IAsyncResult) As Boolean Implements RefAuthenticationSvc.AuthenticationService.EndIsLoggedIn
                Dim _args((0) - 1) As Object
                Dim _result As Boolean = CType(MyBase.EndInvoke("IsLoggedIn", _args, result),Boolean)
                Return _result
            End Function
            
            Public Function BeginLogout(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefAuthenticationSvc.AuthenticationService.BeginLogout
                Dim _args((0) - 1) As Object
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("Logout", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Sub EndLogout(ByVal result As System.IAsyncResult) Implements RefAuthenticationSvc.AuthenticationService.EndLogout
                Dim _args((0) - 1) As Object
                MyBase.EndInvoke("Logout", _args, result)
            End Sub
        End Class
    End Class
End Namespace
