'------------------------------------------------------------------------------
' <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 RefServicioLogin
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),  _
     System.ServiceModel.ServiceContractAttribute([Namespace]:="", ConfigurationName:="RefServicioLogin.Login")>  _
    Public Interface Login
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="urn:Login/Authenticate", ReplyAction:="urn:Login/AuthenticateResponse")>  _
        Function BeginAuthenticate(ByVal usuario As String, ByVal password As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndAuthenticate(ByVal result As System.IAsyncResult) As Boolean
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="urn:Login/SignOut", ReplyAction:="urn:Login/SignOutResponse")>  _
        Function BeginSignOut(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Sub EndSignOut(ByVal result As System.IAsyncResult)
    End Interface
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Public Interface LoginChannel
        Inherits RefServicioLogin.Login, System.ServiceModel.IClientChannel
    End Interface
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class AuthenticateCompletedEventArgs
        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 LoginClient
        Inherits System.ServiceModel.ClientBase(Of RefServicioLogin.Login)
        Implements RefServicioLogin.Login
        
        Private onBeginAuthenticateDelegate As BeginOperationDelegate
        
        Private onEndAuthenticateDelegate As EndOperationDelegate
        
        Private onAuthenticateCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginSignOutDelegate As BeginOperationDelegate
        
        Private onEndSignOutDelegate As EndOperationDelegate
        
        Private onSignOutCompletedDelegate 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 AuthenticateCompleted As System.EventHandler(Of AuthenticateCompletedEventArgs)
        
        Public Event SignOutCompleted 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 RefServicioLogin_Login_BeginAuthenticate(ByVal usuario As String, ByVal password As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefServicioLogin.Login.BeginAuthenticate
            Return MyBase.Channel.BeginAuthenticate(usuario, password, callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefServicioLogin_Login_EndAuthenticate(ByVal result As System.IAsyncResult) As Boolean Implements RefServicioLogin.Login.EndAuthenticate
            Return MyBase.Channel.EndAuthenticate(result)
        End Function
        
        Private Function OnBeginAuthenticate(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Dim usuario As String = CType(inValues(0),String)
            Dim password As String = CType(inValues(1),String)
            Return CType(Me,RefServicioLogin.Login).BeginAuthenticate(usuario, password, callback, asyncState)
        End Function
        
        Private Function OnEndAuthenticate(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As Boolean = CType(Me,RefServicioLogin.Login).EndAuthenticate(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnAuthenticateCompleted(ByVal state As Object)
            If (Not (Me.AuthenticateCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent AuthenticateCompleted(Me, New AuthenticateCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub AuthenticateAsync(ByVal usuario As String, ByVal password As String)
            Me.AuthenticateAsync(usuario, password, Nothing)
        End Sub
        
        Public Overloads Sub AuthenticateAsync(ByVal usuario As String, ByVal password As String, ByVal userState As Object)
            If (Me.onBeginAuthenticateDelegate Is Nothing) Then
                Me.onBeginAuthenticateDelegate = AddressOf Me.OnBeginAuthenticate
            End If
            If (Me.onEndAuthenticateDelegate Is Nothing) Then
                Me.onEndAuthenticateDelegate = AddressOf Me.OnEndAuthenticate
            End If
            If (Me.onAuthenticateCompletedDelegate Is Nothing) Then
                Me.onAuthenticateCompletedDelegate = AddressOf Me.OnAuthenticateCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginAuthenticateDelegate, New Object() {usuario, password}, Me.onEndAuthenticateDelegate, Me.onAuthenticateCompletedDelegate, userState)
        End Sub
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefServicioLogin_Login_BeginSignOut(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefServicioLogin.Login.BeginSignOut
            Return MyBase.Channel.BeginSignOut(callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Sub RefServicioLogin_Login_EndSignOut(ByVal result As System.IAsyncResult) Implements RefServicioLogin.Login.EndSignOut
            MyBase.Channel.EndSignOut(result)
        End Sub
        
        Private Function OnBeginSignOut(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,RefServicioLogin.Login).BeginSignOut(callback, asyncState)
        End Function
        
        Private Function OnEndSignOut(ByVal result As System.IAsyncResult) As Object()
            CType(Me,RefServicioLogin.Login).EndSignOut(result)
            Return Nothing
        End Function
        
        Private Sub OnSignOutCompleted(ByVal state As Object)
            If (Not (Me.SignOutCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent SignOutCompleted(Me, New System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub SignOutAsync()
            Me.SignOutAsync(Nothing)
        End Sub
        
        Public Overloads Sub SignOutAsync(ByVal userState As Object)
            If (Me.onBeginSignOutDelegate Is Nothing) Then
                Me.onBeginSignOutDelegate = AddressOf Me.OnBeginSignOut
            End If
            If (Me.onEndSignOutDelegate Is Nothing) Then
                Me.onEndSignOutDelegate = AddressOf Me.OnEndSignOut
            End If
            If (Me.onSignOutCompletedDelegate Is Nothing) Then
                Me.onSignOutCompletedDelegate = AddressOf Me.OnSignOutCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginSignOutDelegate, Nothing, Me.onEndSignOutDelegate, Me.onSignOutCompletedDelegate, 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 RefServicioLogin.Login
            Return New LoginClientChannel(Me)
        End Function
        
        Private Class LoginClientChannel
            Inherits ChannelBase(Of RefServicioLogin.Login)
            Implements RefServicioLogin.Login
            
            Public Sub New(ByVal client As System.ServiceModel.ClientBase(Of RefServicioLogin.Login))
                MyBase.New(client)
            End Sub
            
            Public Function BeginAuthenticate(ByVal usuario As String, ByVal password As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefServicioLogin.Login.BeginAuthenticate
                Dim _args((2) - 1) As Object
                _args(0) = usuario
                _args(1) = password
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("Authenticate", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndAuthenticate(ByVal result As System.IAsyncResult) As Boolean Implements RefServicioLogin.Login.EndAuthenticate
                Dim _args((0) - 1) As Object
                Dim _result As Boolean = CType(MyBase.EndInvoke("Authenticate", _args, result),Boolean)
                Return _result
            End Function
            
            Public Function BeginSignOut(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefServicioLogin.Login.BeginSignOut
                Dim _args((0) - 1) As Object
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("SignOut", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Sub EndSignOut(ByVal result As System.IAsyncResult) Implements RefServicioLogin.Login.EndSignOut
                Dim _args((0) - 1) As Object
                MyBase.EndInvoke("SignOut", _args, result)
            End Sub
        End Class
    End Class
End Namespace
