'------------------------------------------------------------------------------
' <auto-generated>
'     このコードはツールによって生成されました。
'     ランタイム バージョン:2.0.50727.42
'
'     このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
'     コードが再生成されるときに損失したりします。
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On

Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization

'
'このソース コードは Microsoft.VSDesigner、バージョン 2.0.50727.42 によって自動生成されました。
'
Namespace LoginReference
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42"),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Web.Services.WebServiceBindingAttribute(Name:="LoginServiceSoap", [Namespace]:="http://tempuri.org/")>  _
    Partial Public Class LoginService
        Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
        
        Private GetTicketOperationCompleted As System.Threading.SendOrPostCallback
        
        Private useDefaultCredentialsSetExplicitly As Boolean
        
        '''<remarks/>
        Public Sub New()
            MyBase.New
            Me.Url = Global.BusinessWindows.My.MySettings.Default.BusinessWindows_LoginReference_LoginService
            If (Me.IsLocalFileSystemWebService(Me.Url) = true) Then
                Me.UseDefaultCredentials = true
                Me.useDefaultCredentialsSetExplicitly = false
            Else
                Me.useDefaultCredentialsSetExplicitly = true
            End If
        End Sub
        
        Public Shadows Property Url() As String
            Get
                Return MyBase.Url
            End Get
            Set
                If (((Me.IsLocalFileSystemWebService(MyBase.Url) = true)  _
                            AndAlso (Me.useDefaultCredentialsSetExplicitly = false))  _
                            AndAlso (Me.IsLocalFileSystemWebService(value) = false)) Then
                    MyBase.UseDefaultCredentials = false
                End If
                MyBase.Url = value
            End Set
        End Property
        
        Public Shadows Property UseDefaultCredentials() As Boolean
            Get
                Return MyBase.UseDefaultCredentials
            End Get
            Set
                MyBase.UseDefaultCredentials = value
                Me.useDefaultCredentialsSetExplicitly = true
            End Set
        End Property
        
        '''<remarks/>
        Public Event GetTicketCompleted As GetTicketCompletedEventHandler
        
        '''<remarks/>
        <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetTicket", RequestNamespace:="http://tempuri.org/", ResponseNamespace:="http://tempuri.org/", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>  _
        Public Function GetTicket(ByVal id As String, ByVal password As String, ByVal userData As String) As LoginInformation
            Dim results() As Object = Me.Invoke("GetTicket", New Object() {id, password, userData})
            Return CType(results(0),LoginInformation)
        End Function
        
        '''<remarks/>
        Public Overloads Sub GetTicketAsync(ByVal id As String, ByVal password As String, ByVal userData As String)
            Me.GetTicketAsync(id, password, userData, Nothing)
        End Sub
        
        '''<remarks/>
        Public Overloads Sub GetTicketAsync(ByVal id As String, ByVal password As String, ByVal userData As String, ByVal userState As Object)
            If (Me.GetTicketOperationCompleted Is Nothing) Then
                Me.GetTicketOperationCompleted = AddressOf Me.OnGetTicketOperationCompleted
            End If
            Me.InvokeAsync("GetTicket", New Object() {id, password, userData}, Me.GetTicketOperationCompleted, userState)
        End Sub
        
        Private Sub OnGetTicketOperationCompleted(ByVal arg As Object)
            If (Not (Me.GetTicketCompletedEvent) Is Nothing) Then
                Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
                RaiseEvent GetTicketCompleted(Me, New GetTicketCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
            End If
        End Sub
        
        '''<remarks/>
        Public Shadows Sub CancelAsync(ByVal userState As Object)
            MyBase.CancelAsync(userState)
        End Sub
        
        Private Function IsLocalFileSystemWebService(ByVal url As String) As Boolean
            If ((url Is Nothing)  _
                        OrElse (url Is String.Empty)) Then
                Return false
            End If
            Dim wsUri As System.Uri = New System.Uri(url)
            If ((wsUri.Port >= 1024)  _
                        AndAlso (String.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) = 0)) Then
                Return true
            End If
            Return false
        End Function
    End Class
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42"),  _
     System.SerializableAttribute(),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code"),  _
     System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://tempuri.org/")>  _
    Partial Public Class LoginInformation
        
        Private nameField As String
        
        Private issueDateField As Date
        
        Private expirationField As Date
        
        Private rolesField() As String
        
        Private userDataField As String
        
        '''<remarks/>
        Public Property Name() As String
            Get
                Return Me.nameField
            End Get
            Set
                Me.nameField = value
            End Set
        End Property
        
        '''<remarks/>
        Public Property IssueDate() As Date
            Get
                Return Me.issueDateField
            End Get
            Set
                Me.issueDateField = value
            End Set
        End Property
        
        '''<remarks/>
        Public Property Expiration() As Date
            Get
                Return Me.expirationField
            End Get
            Set
                Me.expirationField = value
            End Set
        End Property
        
        '''<remarks/>
        Public Property Roles() As String()
            Get
                Return Me.rolesField
            End Get
            Set
                Me.rolesField = value
            End Set
        End Property
        
        '''<remarks/>
        Public Property UserData() As String
            Get
                Return Me.userDataField
            End Get
            Set
                Me.userDataField = value
            End Set
        End Property
    End Class
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")>  _
    Public Delegate Sub GetTicketCompletedEventHandler(ByVal sender As Object, ByVal e As GetTicketCompletedEventArgs)
    
    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42"),  _
     System.Diagnostics.DebuggerStepThroughAttribute(),  _
     System.ComponentModel.DesignerCategoryAttribute("code")>  _
    Partial Public Class GetTicketCompletedEventArgs
        Inherits System.ComponentModel.AsyncCompletedEventArgs
        
        Private results() As Object
        
        Friend 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
        
        '''<remarks/>
        Public ReadOnly Property Result() As LoginInformation
            Get
                Me.RaiseExceptionIfNecessary
                Return CType(Me.results(0),LoginInformation)
            End Get
        End Property
    End Class
End Namespace
