'------------------------------------------------------------------------------
' <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 RefRoleSvc
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),  _
     System.ServiceModel.ServiceContractAttribute([Namespace]:="http://asp.net/ApplicationServices/v200", ConfigurationName:="RefRoleSvc.RoleService")>  _
    Public Interface RoleService
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="http://asp.net/ApplicationServices/v200/RoleService/GetRolesForCurrentUser", ReplyAction:="http://asp.net/ApplicationServices/v200/RoleService/GetRolesForCurrentUserRespons"& _ 
            "e")>  _
        Function BeginGetRolesForCurrentUser(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndGetRolesForCurrentUser(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of String)
        
        <System.ServiceModel.OperationContractAttribute(AsyncPattern:=true, Action:="http://asp.net/ApplicationServices/v200/RoleService/IsCurrentUserInRole", ReplyAction:="http://asp.net/ApplicationServices/v200/RoleService/IsCurrentUserInRoleResponse")>  _
        Function BeginIsCurrentUserInRole(ByVal role As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
        
        Function EndIsCurrentUserInRole(ByVal result As System.IAsyncResult) As Boolean
    End Interface
    
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Public Interface RoleServiceChannel
        Inherits RefRoleSvc.RoleService, System.ServiceModel.IClientChannel
    End Interface
    
    <System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>  _
    Partial Public Class GetRolesForCurrentUserCompletedEventArgs
        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 IsCurrentUserInRoleCompletedEventArgs
        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 RoleServiceClient
        Inherits System.ServiceModel.ClientBase(Of RefRoleSvc.RoleService)
        Implements RefRoleSvc.RoleService
        
        Private onBeginGetRolesForCurrentUserDelegate As BeginOperationDelegate
        
        Private onEndGetRolesForCurrentUserDelegate As EndOperationDelegate
        
        Private onGetRolesForCurrentUserCompletedDelegate As System.Threading.SendOrPostCallback
        
        Private onBeginIsCurrentUserInRoleDelegate As BeginOperationDelegate
        
        Private onEndIsCurrentUserInRoleDelegate As EndOperationDelegate
        
        Private onIsCurrentUserInRoleCompletedDelegate 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 GetRolesForCurrentUserCompleted As System.EventHandler(Of GetRolesForCurrentUserCompletedEventArgs)
        
        Public Event IsCurrentUserInRoleCompleted As System.EventHandler(Of IsCurrentUserInRoleCompletedEventArgs)
        
        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 RefRoleSvc_RoleService_BeginGetRolesForCurrentUser(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefRoleSvc.RoleService.BeginGetRolesForCurrentUser
            Return MyBase.Channel.BeginGetRolesForCurrentUser(callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefRoleSvc_RoleService_EndGetRolesForCurrentUser(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of String) Implements RefRoleSvc.RoleService.EndGetRolesForCurrentUser
            Return MyBase.Channel.EndGetRolesForCurrentUser(result)
        End Function
        
        Private Function OnBeginGetRolesForCurrentUser(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Return CType(Me,RefRoleSvc.RoleService).BeginGetRolesForCurrentUser(callback, asyncState)
        End Function
        
        Private Function OnEndGetRolesForCurrentUser(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As System.Collections.ObjectModel.ObservableCollection(Of String) = CType(Me,RefRoleSvc.RoleService).EndGetRolesForCurrentUser(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnGetRolesForCurrentUserCompleted(ByVal state As Object)
            If (Not (Me.GetRolesForCurrentUserCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent GetRolesForCurrentUserCompleted(Me, New GetRolesForCurrentUserCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub GetRolesForCurrentUserAsync()
            Me.GetRolesForCurrentUserAsync(Nothing)
        End Sub
        
        Public Overloads Sub GetRolesForCurrentUserAsync(ByVal userState As Object)
            If (Me.onBeginGetRolesForCurrentUserDelegate Is Nothing) Then
                Me.onBeginGetRolesForCurrentUserDelegate = AddressOf Me.OnBeginGetRolesForCurrentUser
            End If
            If (Me.onEndGetRolesForCurrentUserDelegate Is Nothing) Then
                Me.onEndGetRolesForCurrentUserDelegate = AddressOf Me.OnEndGetRolesForCurrentUser
            End If
            If (Me.onGetRolesForCurrentUserCompletedDelegate Is Nothing) Then
                Me.onGetRolesForCurrentUserCompletedDelegate = AddressOf Me.OnGetRolesForCurrentUserCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginGetRolesForCurrentUserDelegate, Nothing, Me.onEndGetRolesForCurrentUserDelegate, Me.onGetRolesForCurrentUserCompletedDelegate, userState)
        End Sub
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefRoleSvc_RoleService_BeginIsCurrentUserInRole(ByVal role As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefRoleSvc.RoleService.BeginIsCurrentUserInRole
            Return MyBase.Channel.BeginIsCurrentUserInRole(role, callback, asyncState)
        End Function
        
        <System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Function RefRoleSvc_RoleService_EndIsCurrentUserInRole(ByVal result As System.IAsyncResult) As Boolean Implements RefRoleSvc.RoleService.EndIsCurrentUserInRole
            Return MyBase.Channel.EndIsCurrentUserInRole(result)
        End Function
        
        Private Function OnBeginIsCurrentUserInRole(ByVal inValues() As Object, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
            Dim role As String = CType(inValues(0),String)
            Return CType(Me,RefRoleSvc.RoleService).BeginIsCurrentUserInRole(role, callback, asyncState)
        End Function
        
        Private Function OnEndIsCurrentUserInRole(ByVal result As System.IAsyncResult) As Object()
            Dim retVal As Boolean = CType(Me,RefRoleSvc.RoleService).EndIsCurrentUserInRole(result)
            Return New Object() {retVal}
        End Function
        
        Private Sub OnIsCurrentUserInRoleCompleted(ByVal state As Object)
            If (Not (Me.IsCurrentUserInRoleCompletedEvent) Is Nothing) Then
                Dim e As InvokeAsyncCompletedEventArgs = CType(state,InvokeAsyncCompletedEventArgs)
                RaiseEvent IsCurrentUserInRoleCompleted(Me, New IsCurrentUserInRoleCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState))
            End If
        End Sub
        
        Public Overloads Sub IsCurrentUserInRoleAsync(ByVal role As String)
            Me.IsCurrentUserInRoleAsync(role, Nothing)
        End Sub
        
        Public Overloads Sub IsCurrentUserInRoleAsync(ByVal role As String, ByVal userState As Object)
            If (Me.onBeginIsCurrentUserInRoleDelegate Is Nothing) Then
                Me.onBeginIsCurrentUserInRoleDelegate = AddressOf Me.OnBeginIsCurrentUserInRole
            End If
            If (Me.onEndIsCurrentUserInRoleDelegate Is Nothing) Then
                Me.onEndIsCurrentUserInRoleDelegate = AddressOf Me.OnEndIsCurrentUserInRole
            End If
            If (Me.onIsCurrentUserInRoleCompletedDelegate Is Nothing) Then
                Me.onIsCurrentUserInRoleCompletedDelegate = AddressOf Me.OnIsCurrentUserInRoleCompleted
            End If
            MyBase.InvokeAsync(Me.onBeginIsCurrentUserInRoleDelegate, New Object() {role}, Me.onEndIsCurrentUserInRoleDelegate, Me.onIsCurrentUserInRoleCompletedDelegate, 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 RefRoleSvc.RoleService
            Return New RoleServiceClientChannel(Me)
        End Function
        
        Private Class RoleServiceClientChannel
            Inherits ChannelBase(Of RefRoleSvc.RoleService)
            Implements RefRoleSvc.RoleService
            
            Public Sub New(ByVal client As System.ServiceModel.ClientBase(Of RefRoleSvc.RoleService))
                MyBase.New(client)
            End Sub
            
            Public Function BeginGetRolesForCurrentUser(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefRoleSvc.RoleService.BeginGetRolesForCurrentUser
                Dim _args((0) - 1) As Object
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("GetRolesForCurrentUser", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndGetRolesForCurrentUser(ByVal result As System.IAsyncResult) As System.Collections.ObjectModel.ObservableCollection(Of String) Implements RefRoleSvc.RoleService.EndGetRolesForCurrentUser
                Dim _args((0) - 1) As Object
                Dim _result As System.Collections.ObjectModel.ObservableCollection(Of String) = CType(MyBase.EndInvoke("GetRolesForCurrentUser", _args, result),System.Collections.ObjectModel.ObservableCollection(Of String))
                Return _result
            End Function
            
            Public Function BeginIsCurrentUserInRole(ByVal role As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Implements RefRoleSvc.RoleService.BeginIsCurrentUserInRole
                Dim _args((1) - 1) As Object
                _args(0) = role
                Dim _result As System.IAsyncResult = MyBase.BeginInvoke("IsCurrentUserInRole", _args, callback, asyncState)
                Return _result
            End Function
            
            Public Function EndIsCurrentUserInRole(ByVal result As System.IAsyncResult) As Boolean Implements RefRoleSvc.RoleService.EndIsCurrentUserInRole
                Dim _args((0) - 1) As Object
                Dim _result As Boolean = CType(MyBase.EndInvoke("IsCurrentUserInRole", _args, result),Boolean)
                Return _result
            End Function
        End Class
    End Class
End Namespace
