'------------------------------------------------------------------------------
' <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 RefUsersRolesSvc
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),  _
     System.ServiceModel.ServiceContractAttribute([Namespace]:="", ConfigurationName:="RefUsersRolesSvc.UsersRoles")>  _
    Public Interface UsersRoles
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="urn:UsersRoles/Users", ReplyAction:="urn:UsersRoles/UsersResponse")>  _
        Function BeginUsers(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndUsers(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of String)
    End Interface
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Public Interface UsersRolesChannel
        Inherits RefUsersRolesSvc.UsersRoles, System.ServiceModel.IClientChannel
    End Interface
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class UsersCompletedEventArgs
        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 System.Collections.ObjectModel.ObservableCollection(Of String)
            Get
                MyBase.RaiseExceptionIfNecessary
                Return CType(Me.results(0),System.Collections.ObjectModel.ObservableCollection(Of String))
            End Get
        End Property
    End Class
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class UsersRolesClient
        Inherits System.ServiceModel.ClientBase(Of RefUsersRolesSvc.UsersRoles)
        Implements RefUsersRolesSvc.UsersRoles
        
        Private onBeginUsersDelegate As BeginOperationDelegate
        
        Private onEndUsersDelegate As EndOperationDelegate
        
        Private onUsersCompletedDelegate 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 UsersCompleted As System.EventHandler(Of UsersCompletedEventArgs)
        
        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 RefUsersRolesSvc_UsersRoles_BeginUsers(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefUsersRolesSvc.UsersRoles.BeginUsers
            Return MyBase.Channel.BeginUsers(callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefUsersRolesSvc_UsersRoles_EndUsers(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of String) Implements RefUsersRolesSvc.UsersRoles.EndUsers
            Return MyBase.Channel.EndUsers(result)
        End Function
        
        Private Function OnBeginUsers(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,RefUsersRolesSvc.UsersRoles).BeginUsers(callback, asyncState)
        End Function
        
        Private Function OnEndUsers(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As System.Collections.ObjectModel.ObservableCollection(Of String) = CType(Me,RefUsersRolesSvc.UsersRoles).EndUsers(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnUsersCompleted(ByVal state As Object)
            If (Not (Me.UsersCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent UsersCompleted(Me, New UsersCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub UsersAsync()
            Me.UsersAsync(Nothing)
        End Sub
        
        Public Overloads Sub UsersAsync(ByVal userState As Object)
            If (Me.onBeginUsersDelegate Is Nothing) Then
                Me.onBeginUsersDelegate = AddressOf Me.OnBeginUsers
            End If
            If (Me.onEndUsersDelegate Is Nothing) Then
                Me.onEndUsersDelegate = AddressOf Me.OnEndUsers
            End If
            If (Me.onUsersCompletedDelegate Is Nothing) Then
                Me.onUsersCompletedDelegate = AddressOf Me.OnUsersCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginUsersDelegate, Nothing, Me.onEndUsersDelegate, Me.onUsersCompletedDelegate, 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 RefUsersRolesSvc.UsersRoles
            Return New UsersRolesClientChannel(Me)
        End Function
        
        Private Class UsersRolesClientChannel
            Inherits ChannelBase(Of RefUsersRolesSvc.UsersRoles)
            Implements RefUsersRolesSvc.UsersRoles
            
            Public Sub New(ByVal client As System.ServiceModel.ClientBase(Of RefUsersRolesSvc.UsersRoles))
                MyBase.New(client)
            End Sub
            
            Public Function BeginUsers(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefUsersRolesSvc.UsersRoles.BeginUsers
                Dim _args((0) - 1) As Object
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("Users", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndUsers(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of String) Implements RefUsersRolesSvc.UsersRoles.EndUsers
                Dim _args((0) - 1) As Object
                Dim _result As System.Collections.ObjectModel.ObservableCollection(Of String) = CType(MyBase.EndInvoke("Users", _args, result),System.Collections.ObjectModel.ObservableCollection(Of String))
                Return _result
            End Function
        End Class
    End Class
End Namespace
